/* filename: zlog.css */
/* update time: 2025.12.02 */
/* homepage: https://zlog.net */

/*@import '//cdn.staticfile.org/lxgw-wenkai-screen-webfont/1.6.0/lxgwwenkaiscreen.css?ver=6.2.2';*/

:root {
    --bgcolor: rgb(233, 237, 237);
    --darknumer: 0;
    --darkdegree: 0deg;
    --scrollbar-track: rgb(233, 237, 237);
    --scrollbar-thumb: #d1ece9;
}

[data-theme="dark"] {
    --darknumer: 1;
    --darkdegree: 180deg;
    --scrollbar-track: #000;
    --scrollbar-thumb: #96c2b6;
}

[data-theme="light"] {
    --darknumer: 0;
    --darkdegree: 0deg;
    --bgcolor: rgb(233, 237, 237);
    --scrollbar-track: rgb(233, 237, 237);
    --scrollbar-thumb: #96c2b6;
}

html {
    filter: invert(var(--darknumer)) hue-rotate(var(--darkdegree));
    transition: all 0.5s ease-in-out;
    scroll-behavior: smooth;
}

/* 滚动条本体：宽度在这里设置 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* 滚动条轨道 */
::-webkit-scrollbar-track {
    background-color: var(--scrollbar-track);
}

/* 滚动条拇指 */
::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: var(--scrollbar-thumb);
    -webkit-box-shadow: 0 0 1px hsla(0, 0%, 100%, 0.3);
}

.toggle {
    font-size: 20px;
    color: #1a4a4a;
    background-color: #0e0e0e00;
    border: 0px;
    width: 20px;
    height: 20px;
    position: fixed;
    right: 10px;
    top: 10px;
    left: unset;
    cursor: pointer;
    transition: all 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.toggle:hover {
    transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -webkit-transform: rotate(360deg);
    -o-transform: rotate(360deg);
}

body {
    background: var(--bgcolor);
    transition: all 0.5s ease-in-out;
    font-family: monospace, "Century Gothic", "LXGW WenKai Screen", sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

img,
video,
pre {
    filter: invert(var(--darknumer)) hue-rotate(var(--darkdegree));
}



header {
    text-align: right;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

h1 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

#heatmap {
    display: flex;
    align-items: start;
    flex-direction: column;
    gap: 1px;
    justify-content: center;
    margin: 20px 0 20px 0;
    background: #ffffff;
    border-radius: 8px;
    padding: 20px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.month-row {
    display: grid;
    grid-template-columns: repeat(31, 8px);
    gap: 2px;
}

.day {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background-color: #ebedf0;
    transition: background-color 0.5s;
}

.day:hover {
    background-color: #d0d7de;
}

.tooltip {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 5px;
    pointer-events: none;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.month-label {
    display: inline-block;
    width: 30px;
    text-align: right;
    margin-right: 10px;
    font-weight: bold;
    font-size: 12px;
    font-family: 'Courier New', Courier, monospace;
    color: #333;
}

.month-container {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
}


.empty-heatmap {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 99;
    border: none;
    outline: none;
    padding: 3px 3px 0 3px;
    background: #8f8f8f00;
    color: #795548;
    cursor: pointer;
    border-radius: 10px;
}

#backToTop:hover {
    background-color: #8f8f8f8f;
    color: #f1f0f0;
    border-radius: 10px;
    transition: all 1s;
}


.subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

.memo-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.memo-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    white-space: normal;
    word-break: break-word;
}

.memo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.memo-anchor {
    position: absolute;
    top: -20px;
    visibility: hidden;
}

.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.memo-date {
    background: #eaf4f4;
    color: #1a4a4a;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    width: fit-content;
}

.memo-date:hover {
    background: #9fc9c9;
    color: #1a4a4a;
    transition: all 1s ease-in-out;
}

.memo-link {
    color: #1a4a4a;
    text-decoration: none;
}

.memo-percent {
    background: #9fc9c9; /*#96c2b6;  #c1d5b8; */
    width: fit-content;
    padding: 0 5px;
    border-radius: 8px;
    font-size: 0.7em;
}

#backbutton {
    margin: 10px 0;
    padding: 0.5em 0.5em;
    color: #1a4a4a;
    font-weight: bold;
    background: #eaf4f4;
    font-family: Galdeano, Cuprum, "Microsoft Yahei", sans-serif;
    border-radius: 15px;
    cursor: pointer;
    border: 0;
    transition: all 1s ease-in-out;
}

#backbutton:hover {
    color: #eaf4f4;
    padding: 0.5em 1em;
    background: #1a4a4a;
    border-radius: 15px;
    border: 0;
}


.memo-bottom-date {
    color: #1a4a4a;
    font-size: 0.8rem;
    text-align: right;
}


.memo-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tag {
    background: #eaf4f4;
    color: #1a4a4a;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.memo-content {
    margin-bottom: 15px;
}

.memo-content p {
    margin-bottom: 10px;
}

.memo-content code {
    color: #1a4a4a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.memo-content pre {
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
    border-left: 3px solid #1a4a4a;
}

.memo-attachments {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.memo-attachments img {
    width: 100%;
    max-width: 720px;
    height: inherit;
    display: block;
    margin: 15px 4px 15px 4px;
    -webkit-box-shadow: #999 1px 1px 4px;
    -moz-box-shadow: #999 1px 1px 4px;
    box-shadow: #999 1px 1px 4px;
}

.attachment {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.attachment:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.attachment-image {
    max-width: 300px;
}

.attachment-video {
    max-width: 300px;
}

.attachment img {
    width: 100%;
    height: auto;
    display: block;
}

.attachment video {
    width: 100%;
    height: auto;
    display: block;
}

.attachment-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 74, 74, 0.3);
    color: white;
    padding: 5px 8px;
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
}

.attachment-type {
    text-transform: uppercase;
    font-weight: bold;
}

/* 图片模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 74, 74, 0.3);;
    animation: fadeIn 0.3s;
}

.modal-content {
    position: relative;
    margin: auto;
    display: flex;
    max-width: 100%;
    max-height: 100%;
    top: 50%;
    transform: translateY(-50%);
    animation: zoomIn 0.3s;
}

.modal-image {
    object-fit: contain;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: 0.3s;
}

.close:hover {
    color: #bbb;
}

.modal-info {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 10px;
    background: rgba(26, 74, 74, 0.3);
}

.modal-navigation {
    position: absolute;
    z-index: 1001;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0px 0px;
    transform: translateY(-50%);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0%;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: translateY(-50%) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.error {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
    background: #fdf2f2;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.data-source {
    margin-top: 10px;
    font-size: 0.8rem;
}


/* --- Navbar Base --- */
.zl-navbar {
    width: 100%;
    top: 0;
    left: 0;
    z-index: 999;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

.zl-nav-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.zl-nav-logo a {
    font-weight: 600;
    font-size: 20px;
    color: #333;
    text-decoration: none;
}

/* --- Desktop Nav --- */
.zl-nav-menu li {
    position: relative;
}

/* Frosted hover background */
.zl-nav-menu li::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #ffffff;

    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: -1;
}

.zl-nav-menu li:hover::before {
    opacity: 1;
}

.zl-nav-menu {
    list-style: none;
    display: flex;
    gap: 26px;
}

.zl-nav-menu li a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    transition: 0.2s ease;
}

.zl-nav-menu li a:hover {
    color: #0073ff;
}

/* --- Mobile Toggle Button --- */
.zl-nav-toggle {
    display: none;
    flex-direction: column;
    width: 26px;
    height: 22px;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.zl-nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- Mobile Menu --- */
@media (max-width: 768px) {
    .zl-nav-menu {
        z-index: 9999;
    }

    .zl-nav-toggle {
        display: flex;
    }

    .zl-nav-menu {
        position: absolute;
        top: 56px;
        left: 0;
        width: 100%;
        background: #ffffff;

        flex-direction: column;
        padding: 12px 0;
        display: none;

    }

    .zl-nav-menu li {
        padding: 10px 0;
        text-align: center;
    }

    .zl-nav-menu.active {
        display: flex;
    }
}

/* Toggle Animation */
.zl-nav-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.zl-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.zl-nav-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 分页按钮样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 14px;
    border: 1px solid #e1e1e1;
    background-color: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f5f5f5;
    border-color: #1a4a4a;
    color: #1a4a4a;
}

.pagination-btn.active {
    background-color: #1a4a4a;
    color: white;
    border-color: #1a4a4a;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active:hover {
    background-color: #1a4a4a;
    color: white;
}

@media (max-width: 390px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 1rem;
    }

    .memo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .attachment-image {
        max-width: 150px;
    }

    .attachment-video {
        max-width: 250px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }

    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 16px;
    }

    .month-label {
        width: 25px;
        font-size: 10px;
    }

    .month-row {
        grid-template-columns: repeat(31, 7px);
        gap: 1px;
    }

    .day {
        width: 7px;
        height: 7px;
    }

    .pagination-container {
        gap: 5px;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
        min-width: 35px;
    }
}