body {
    background-color: #cbd5e1;
    background-image: radial-gradient(transparent 1px, #f8fafc 1px);
    background-size: 5vmin 5vmin;
    background-position: center top;
}

header {
    display: flex;
    height: 64px;
    background-color: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
    align-items: center;
    padding: 32px;
}

header .logo-title {
    font-weight: bold;
    font-size: 32px;
}

button {
    transition: filter .15s, color .15s, background-color .15s;
    user-select: none;
}

button:hover {
    filter: brightness(1.02);
}

button:active {
    filter: brightness(0.9);
    transition: unset;
}

button:disabled {
    opacity: 0.5;
    filter: unset;
    transition: unset;
    cursor: not-allowed;
}

.fake-ai-search-link,
.fake-todo-link,
.fake-map-link {
    color: #3b82f6;
    fill: #3b82f6;
    cursor: pointer;
}

.fake-ai-search-link svg,
.fake-todo-link svg,
.fake-map-link svg {
    width: 16px;
    height: 16px;
}

.fake-ai-search-link:hover,
.fake-todo-link:hover,
.fake-map-link:hover {
    color: #5797fd;
    fill: #5797fd;
}

.fake-ai-search-link:active,
.fake-todo-link:active,
.fake-map-link:active {
    color: #2660bd;
    fill: #2660bd;
    transition: unset;
}

.author {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0;
    padding: 0 8px;
}

.author-avatar {
    display: flex;
    height: 48px;
    width: 48px;
    min-width: 48px;
    border-radius: 24px;
    overflow: hidden;
}

.author-info {
    flex: 1;
    min-width: 128px;
}

.author-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.author-name {
    font-weight: bold;
    font-size: 16px;
}

.author-name-tag {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #dcfce7;
    color: #16a34a;
    border-radius: 12px;
    height: 24px;
    line-height: 24px;
    padding: 0 8px 0 6px;
    margin-left: 4px;
}

.author-name-tag svg {
    fill: #16a34a;
    width: 18px;
    height: 18px;
}

.author-desc {
    font-size: 14px;
    color: #888;
    line-height: 18px;
}

.author-action {
    min-width: 74px;
}

.follow.enable,
#daily-signin.enable {
    background-color: #3b82f6;
    color: #fff;
}

.comments-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 8px 0;
    padding: 8px 0;
}

.comments-item-user-title {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comments-author-tag {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    background-color: #dcfce7;
    color: #16a34a;
    border-radius: 12px;
    height: 24px;
    line-height: 24px;
    padding: 0 12px;
    margin-left: 4px;
}

.comments-body-tag {
    color: #3b82f6;
    fill: #3b82f6;
    border: 1px solid #3b82f6;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 4px;
    height: 22px;
    line-height: 22px;
    padding: 0 8px 0 6px;
    margin-left: 4px;
}

.comments-body-tag svg {
    width: 16px;
    height: 16px;
}

.comments-item-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.comments-item-action-button {
    display: flex;
    align-items: center;
    padding: 4px;
    background-color: transparent;
    gap: 6px;
    color: #888;
    fill: #888;
    transition: color .15s, fill .15s;
}

.comments-item-action-button:hover {
    color: #3b82f6;
    fill: #3b82f6;
}

.comments-item-action-button svg {
    width: 18px;
    height: 18px;
}

.ai-chat-button {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: unset;
    background-color: #3b82f6;
    fill: #fff;
    border-radius: 32px;
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 100;
    box-shadow: 0 0 16px #cbd5e1;
}

.ai-chat-button svg {
    width: 36px;
    height: 36px;
}

.ai-chat-window {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 1rem;
    bottom: 0;
    z-index: 1000;
    background-color: #fff;
    width: min(500px, calc(100dvw - 2rem));
    height: min(680px, calc(100dvh - 2rem));
    box-shadow: 0 0 64px #cbd5e1;
    border-radius: 16px 16px 0 0 ;
    overflow: hidden;
    opacity: 1;
    transition: bottom .3s, opacity .3s;
}

.ai-chat-window.hidden {
    bottom: -100vh;
    opacity: 0;
}

.ai-chat-window.hidden button {
    visibility: hidden;
}

.ai-chat-window-title-bar {
    display: flex;
    align-items: center;
    background-color: #334155;
    color: #fff;
    fill: #fff;
    font-weight: bold;
    height: 48px;
    padding: 0 1rem;
    cursor: pointer;
}

.ai-chat-window-title-bar .title {
    flex: 1;
}

.ai-chat-window-title-bar .close {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-window-title-bar .close svg {
    width: 28px;
    height: 28px;
}

.ai-chat-window-token {
    padding: 4px 16px;
    color: #888;
    border-bottom: 1px solid #e8e8e8;
    font-size: 14px;
}

#ai-token.warn {
    color: #d12b2b;
}

.ai-chat-window-content {
    display: flex;
    flex: 1;
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    overflow-y: scroll;
}

.ai-chat-window-content .chat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ai-chat-window-content .chat-item .body {
    padding: 0.5rem 1rem;
    background-color: #f8fafc;
    border-radius: 0 1.5rem 1.5rem 1.5rem;
    word-break: break-word;
    white-space: break-spaces;
}

.ai-chat-window-content .chat-item-user  {
    align-items: flex-end;
}

.ai-chat-window-content .chat-item-user .body {
    background-color: #3b82f6;
    border-radius: 1.5rem 0 1.5rem 1.5rem;
    color: #fff;
}

.ai-chat-window-input {
    display: flex;
    height: 6rem;
    box-sizing: border-box;
    border-top: 1px #ddd solid;
    align-items: stretch;
    overflow: hidden;
}

#ai-chat-textarea {
    flex: 1;
    height: auto;
    min-width: unset !important;
    border: none;
    border-radius: 0;
    outline: none;
    resize: none;
    box-sizing: border-box;
}

.ai-chat-window-input button {
    border-radius: 0;
    padding: 0.5rem;
    min-width: 4rem;
}

footer {
    background-color: #fff;
    min-height: 300px;
    box-sizing: border-box;
    color: #888;
    font-size: 14px;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 32px;
}

.footer-logo {
    font-size: 32px;
    font-weight: bold;
    color: #000;
}

footer p,
footer a {
    color: #888;
}