body {
    margin: 0;
    padding: 0;
    background: url('diarybg.png') no-repeat center center fixed;
    background-size: cover;
    font-family: "Tahoma", sans-serif;
    overflow: hidden;
}

#enter-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.5s ease;
}

.enter-text {
    color: #00ffff;
    font-family: "Courier New", monospace;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff;
    animation: flashText 1s infinite alternate;
}

@keyframes flashText {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.index-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 200;
}

.index-btn img {
    width: 220px; 
    height: auto;
    transition: transform 0.05s ease-out, filter 0.05s ease-out;
}

.index-btn:hover img {
    transform: scale(1.15) rotate(10deg);
    filter: brightness(1.6) drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #ff00ff) drop-shadow(0 0 12px #00ffff);
    cursor: pointer;
}

.cd-box {
    position: fixed;
    bottom: -40px;
    right: -40px;
    z-index: 100;
    cursor: pointer;
}

.cd-tooltip {
    position: absolute;
    top: -15px;
    left: 15%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border: 1px solid #00ffff;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 5px #00ffff;
}

.cd-box:hover .cd-tooltip {
    opacity: 1;
}

.sparkle-cd {
    width: 280px;
    position: relative;
    z-index: 2;
    animation: rotateCD 4s linear infinite, sharpGlint 0.5s steps(2, end) infinite alternate;
    animation-play-state: paused;
}

.particle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px #fff, 0 0 12px 4px #00ffff;
    opacity: 0;
    z-index: 3;
    animation: flashParticle 1s linear infinite;
    animation-play-state: paused;
}

.p1 { top: 15%; left: 20%; width: 3px; height: 3px; animation-delay: 0.1s; }
.p2 { top: 75%; left: 15%; width: 4px; height: 4px; animation-delay: 0.4s; }
.p3 { top: 25%; left: 80%; width: 5px; height: 5px; animation-delay: 0.7s; }
.p4 { top: 85%; left: 70%; width: 3px; height: 3px; animation-delay: 0.2s; }
.p5 { top: 50%; left: 10%; width: 2px; height: 2px; animation-delay: 0.8s; }
.p6 { top: 40%; left: 85%; width: 4px; height: 4px; animation-delay: 0.5s; }

@keyframes rotateCD {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes sharpGlint {
    0% { filter: brightness(1) contrast(1) drop-shadow(0 0 0px #fff); }
    100% { filter: brightness(1.5) contrast(1.2) drop-shadow(0 0 8px rgba(255,255,255,0.8)); }
}

@keyframes flashParticle {
    0%, 100% { opacity: 0; transform: scale(0.1); }
    50% { opacity: 1; transform: scale(1.8); }
}

.main-container {
    position: absolute;
    top: 60px;
    bottom: 60px;
    left: 280px;
    right: 180px;
    overflow-y: scroll;
    padding: 20px;
}

.main-container::-webkit-scrollbar {
    width: 16px;
}

.main-container::-webkit-scrollbar-track {
    background: #dfd6c4;
    border: 1px solid #7b7b7b;
}

.main-container::-webkit-scrollbar-thumb {
    background: #0055e5;
    border: 1px solid #fff;
    box-shadow: inset 1px 1px #00000050;
}

.diary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    position: relative;
}

.xp-window {
    background: #ece9d8;
    border: 3px solid #0055e5;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    min-width: 250px;
    max-width: 400px; 
}

.xp-title {
    background: linear-gradient(to bottom, #0058e6 0%, #3a93ff 10%, #0055e5 100%);
    padding: 3px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px #000;
    border-bottom: 1px solid #0055e5;
    cursor: grab;
}

.xp-txt {
    font-size: 12px;
}

.xp-ctrl {
    display: flex;
    gap: 2px;
}

.xp-ctrl div {
    width: 19px;
    height: 19px;
    border: 1px solid #fff;
    border-radius: 3px;
    cursor: pointer;
}

.xp-min, .xp-max {
    background: linear-gradient(to bottom, #7697f7, #104ce5);
}

.xp-close {
    background: linear-gradient(to bottom, #e38a73, #c63110);
    position: relative;
}

.xp-close::after {
    content: "X";
    font-size: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.xp-body {
    background: #fff;
    margin: 2px;
    padding: 12px;
    border: 1px solid #7f9db9;
    min-height: 100px;
    font-size: 12px;
    color: #000;
}