#digital-clock {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 20px;
    font-family: 'ZHFont', sans-serif;
    color: #ffffff;
    background-color: rgba(109, 165, 255, 0.445);
    padding: 5px 20px;
    border-radius: 5px;
  }
  
body {
    background: #0b1024;
}

.video-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: -2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease;
}

.video-background.is-active {
    z-index: -1;
    opacity: 1;
}

.video-background.is-under {
    opacity: 1;
    transition: none;
}

.video-background video,
.video-splash-transition video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-splash-transition {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.video-splash-transition.is-playing {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
    .video-background { transition-duration: 0.4s; }
}

.container {
    background-image: url('/assets/images/about-me/journal.png');
    background-size: cover;
    position: absolute;
    width: 1270px;
    height: 715px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.diary {
    position: absolute;
    width: 550px;
    height: 460px; 
    right: -18px; 
    bottom: 90px;
    top: 19%;
    overflow: auto;
}

.diary iframe {
    transition: opacity 0.3s ease;
}

.memo {
    position: absolute;
    width: 318px;
    height: 275px;
    left: 115px;
    top: 40px;
    padding: 10px;
    overflow: auto;
    border: none; 
    background: transparent;
}


::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 4px;
}
.memo::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}

.memo::-webkit-scrollbar-thumb {
    background: rgba(93, 166, 255, 0.341);
    border-radius: 4px;
}


.header {
    background-color: rgba(255, 255, 255, 0);
    background-image: url("/assets/images/banners/06.png");
    background-size: cover;
    background-repeat: no-repeat;
    width: 93%;
    height: 20px;
    top: 0;
    border: none;
    padding: 8px;
    font-size: 25px;
    color: rgb(255, 255, 255);
    font-family: 'ZHFont', sans-serif;
    z-index: 1; 
}

.memo a {
    text-decoration: none;
    font-family: 'ZHFont', sans-serif;
    color: #9e97ff;
    font-weight: lighter;
    transition: opacity 0.2s ease;
}

.memo a:hover {
    opacity: 0.7;
}
hr {
    border: none;
    height: 1px;
    background-color: #7ea9ff; 
    margin: 20px 0;  
  }
.corner-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.3s ease;
}

.corner-icon:hover {
    transform: scale(1.1);
}
.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100 * var(--vh, 1vh));
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.message-overlay.visible {
     opacity: 1 !important;
}

.transition-message {
    font-size: 2rem; 
    color: white;
    text-shadow: 2px 2px 8px rgba(149, 211, 255, 0.7); 
    text-align: center;
    font-family: 'ZHFont', sans-serif;
    padding: 20px;
    border-radius: 15px;
    animation: fadeInOut 3s ease-in-out; 
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

body ::selection {
    background: #91ceff;
  }
  














.memo-empty {
    padding: 12px 6px;
    font-family: 'ZHFont', sans-serif;
    color: #7ea9ff;
    font-size: 13px;
    text-align: center;
}

.month { margin-bottom: 12px; }
.month[hidden] { display: none; }

.entry {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 3px 0;
}

.entry[hidden] { display: none; }
.entry + .entry { border-top: 1px dashed rgba(126, 169, 255, 0.35); margin-top: 4px; padding-top: 6px; }

.entry .fav-btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 0;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.2s ease;
}

.entry .fav-btn img {
    width: 100%;
    height: 100%;
    display: block;
    filter: grayscale(1) brightness(1.15) opacity(0.55);
    transition: filter 0.2s ease, transform 0.2s ease;
}

.entry .fav-btn:hover img { filter: grayscale(0) opacity(0.9); transform: scale(1.1); }
.entry .fav-btn[aria-pressed="true"] img {
    filter: drop-shadow(0 0 6px rgba(140, 200, 255, 0.85));
    transform: scale(1.05);
}

.entry a { flex: 1; }


.journal-search {
    position: fixed;
    top: 20px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    width: min(940px, calc(92 * var(--vw, 1vw)));
    background: rgba(20, 28, 60, 0.6);
    border: 1px solid rgba(140, 190, 255, 0.35);
    border-radius: 20px;
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    box-shadow: 0 10px 32px rgba(10, 14, 32, 0.4);
    z-index: 50;
    font-family: 'departure-mono', monospace;
    transform: translate(-50%, -24px);
    opacity: 0;
    animation: journal-search-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

@keyframes journal-search-enter {
    to { transform: translate(-50%, 0); opacity: 1; }
}

.journal-search .search-field {
    position: relative;
    flex: 0 0 260px;
    display: flex;
    align-items: center;
}

.journal-search .search-glyph {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #a9c8ff;
    transform: translateY(-50%);
    pointer-events: none;
    transition: border-color 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.journal-search .search-glyph::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 2px;
    background: #a9c8ff;
    border-radius: 2px;
    top: 100%;
    left: 100%;
    transform: translate(-2px, -1px) rotate(45deg);
    transform-origin: 0 50%;
    transition: background 0.25s ease;
}

.journal-search .search-field:focus-within .search-glyph {
    border-color: #7db8ff;
    transform: translateY(-50%) rotate(-18deg) scale(1.15);
}

.journal-search .search-field:focus-within .search-glyph::after {
    background: #7db8ff;
}

.journal-search .search-field input {
    flex: 1;
    padding: 9px 14px 9px 32px;
    border: 1px solid rgba(140, 190, 255, 0.4);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: #2b3562;
    font-family: 'ZHFont', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.3s ease, background 0.2s ease;
}

.journal-search .search-field input:focus {
    border-color: #7db8ff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(125, 184, 255, 0.25);
}

.journal-search .search-field input::placeholder { color: #7a86b5; }

.journal-search .filter-chips {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

.journal-search .chip-slider {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    background: #a9c8ff;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(169, 200, 255, 0.4);
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
}

.journal-search .chip-slider.is-ready { opacity: 1; }

.journal-search .chip {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #dfeaff;
    font-family: 'departure-mono', monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.25s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.journal-search .chip:hover { color: #ffffff; transform: translateY(-1px); }
.journal-search .chip:active { transform: translateY(0) scale(0.96); }

.journal-search .chip.is-active { color: #1a2148; font-weight: 600; }

.journal-search .chip.fav {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 190, 220, 0.35);
    color: #ffd5e6;
}

.journal-search .chip.fav[aria-pressed="true"] {
    background: #ffb0c9;
    color: #4a1a30;
    border-color: #ffb0c9;
    box-shadow: 0 0 12px rgba(255, 176, 201, 0.5);
    transform: scale(1.04);
}

.journal-search .chip.fav img { display: inline-block; vertical-align: middle; }

.memo-empty {
    padding: 14px 6px;
    font-family: 'ZHFont', sans-serif;
    color: #7ea9ff;
    font-size: 13px;
    text-align: center;
    animation: fade-in 0.4s ease;
}

.month {
    margin-bottom: 12px;
    animation: fade-in 0.5s ease;
}

.month.is-hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    overflow: hidden;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        margin 0.4s ease;
}

.entry {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 0;
    max-height: 80px;
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.3s ease,
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.3s ease;
}

.entry.is-hidden {
    opacity: 0;
    transform: translateY(-6px);
    max-height: 0;
    padding: 0;
    pointer-events: none;
    overflow: hidden;
}

.entry a {
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.entry:hover a { transform: translateX(4px); }

.entry + .entry {
    border-top: 1px dashed rgba(126, 169, 255, 0.35);
    margin-top: 4px;
    padding-top: 8px;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.entry .fav-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 0;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.entry .fav-btn:hover { transform: translateY(-1px) scale(1.08); }
.entry .fav-btn:active { transform: translateY(0) scale(0.95); }

.entry .fav-btn img {
    position: relative;
    top: 9px;
    left: 3px;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    opacity: 0.45;
    filter: grayscale(0.7);
    transform: scale(0.9);
    transition:
        opacity 0.3s ease,
        filter 0.3s ease,
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.entry .fav-btn:hover img {
    opacity: 0.9;
    filter: grayscale(0.15);
    transform: scale(1);
}

.entry .fav-btn[aria-pressed="true"] img {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(126, 169, 255, 0.6));
    transform: scale(1);
    animation: bookmark-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bookmark-pop {
    0%   { transform: scale(0.5) rotate(-12deg); }
    55%  { transform: scale(1.25) rotate(6deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.entry.is-bursting::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 15px;
    width: 1px;
    height: 1px;
    pointer-events: none;
    box-shadow:
        0 -18px 0 2px rgba(255, 220, 240, 0.9),
        14px -6px 0 2px rgba(180, 220, 255, 0.9),
        -12px -8px 0 2px rgba(255, 230, 200, 0.9),
        16px 10px 0 1.5px rgba(200, 230, 255, 0.85),
        -14px 12px 0 1.5px rgba(255, 210, 235, 0.85);
    animation: bookmark-sparkle 0.7s ease-out forwards;
}

@keyframes bookmark-sparkle {
    0%   { opacity: 0; transform: scale(0.5); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: scale(1.9); }
}

@media (max-width: 768px) {
    #digital-clock {
        top: 20px;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        font-size: 16px;
    }

    .journal-search {
        position: absolute;
        top: 86px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: calc(100% - 32px);
        box-sizing: border-box;
    }

    .journal-search .search-field {
        flex: none;
    }

    .journal-search .filter-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .journal-search .filter-chips::-webkit-scrollbar {
        display: none;
    }

    .container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: auto;
        height: auto;
        margin: 200px 16px 40px;
        background-image: none;
    }

    .memo,
    .diary {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: auto;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(126, 169, 255, 0.45);
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(10, 14, 32, 0.25);
    }

    .memo {
        order: -1;
        height: 260px;
        padding: 12px;
    }

    .diary {
        height: calc(70 * var(--vh, 1vh));
        overflow: hidden;
    }

    .diary iframe {
        width: 100%;
        height: 100%;
    }
}
