@import url('https://fonts.googleapis.com/css2?family=DotGothic16&family=Mali:wght@400;700&family=Quicksand:wght@500;700&family=Be+Vietnam+Pro&display=swap');
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #dfdfdf; border-left: 2px solid #fff; border-top: 2px solid #fff; }
::-webkit-scrollbar-thumb { background: var(--bg-color); border: 2px solid; border-color: #fff #848484 #848484 #fff; }

:root {
    --bg-color: #ffb7e2;
    --window-bg: #ffe4e1;
    --text-size: 16px;
    --title-color: #ff1493;
    --text-color: #000000;
    --border-light: #ffffff;
    --border-dark: #a05a7b;
}
body.dark-mode {
    --bg-color: #2b1424;
    --window-bg: #4a2536;
    --title-color: #912758;
    --text-color: #ffd1dc;
    --border-light: #7a3d59;
    --border-dark: #1f0e1a;
}
* { 
    box-sizing: border-box; 
    cursor: url('https://cdn.cursors-4u.net/previews/slapping-cat-1348ecde-preview-32.webp') 0 0, auto !important; 
}
body {
    background-color: var(--bg-color);
    background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255, 255, 255, 0.2) 2px, rgba(255, 255, 255, 0.2) 4px);
    background-attachment: fixed;
    color: var(--text-color);
    font-family: 'DotGothic16', sans-serif;
    margin: 0; padding: 0 0 50px 0; overflow-x: hidden;
}
.scanlines {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.05) 50%, rgba(0,0,0,0.05));
    background-size: 100% 4px; pointer-events: none; z-index: 9998;
}
.top-menu-bar {
    background: var(--title-color); color: white;
    display: flex; gap: 20px; padding: 5px 15px;
    font-weight: bold; border-bottom: 2px solid var(--border-dark);
    position: relative; z-index: 1000; font-size: 16px;
}
.top-menu-bar a { color: white; text-decoration: none; cursor: pointer; transition: 0.2s;}
.top-menu-bar a:hover { background: white; color: var(--title-color); padding: 0 5px;}
.anime-mascot { position: fixed; z-index: 9990; pointer-events: none; animation: float 3s infinite alternate; filter: drop-shadow(2px 2px 0 var(--border-dark));}
.mascot-bl { bottom: 60px; left: 10px; width: 150px; }
.mascot-br { bottom: 60px; right: 10px; width: 180px; }
.mascot-tr { top: 50px; right: 20px; width: 120px; }
.os-window {
    background: var(--window-bg);
    border: 3px solid; border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
    margin-bottom: 20px; box-shadow: 4px 4px 0px rgba(0,0,0,0.2); position: relative; z-index: 10;
    max-width: 100%;
}
.os-title-bar {
    background: var(--title-color); color: white; padding: 3px 8px; font-size: 16px;
    display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--border-dark);
}
.os-window-btn { display: flex; gap: 4px; }
.os-btn-mini { background: #c0c0c0; border: 2px solid; border-color: #fff #000 #000 #fff; width: 20px; height: 20px; display: flex; justify-content: center; align-items: center; font-size: 12px; font-weight: bold; color: black; cursor: pointer; line-height: 1; }
.os-btn-mini:active { border-color: #000 #fff #fff #000; }
.os-content { padding: 15px; }
.win-btn {
    background: #dfdfdf; color: black; border: 2px solid; border-color: #fff #848484 #848484 #fff;
    padding: 6px 15px; font-weight: bold; text-decoration: none; display: inline-block; cursor: pointer; font-family: inherit;
}
.win-btn:active { border-color: #848484 #fff #fff #848484; background: #c0c0c0; transform: translate(2px, 2px); }
.desktop-grid {
    display: grid; grid-template-columns: 300px 1fr 300px; gap: 15px;
    max-width: 1400px; margin: 20px auto; padding: 0 10px;
}
.col { display: flex; flex-direction: column; min-width: 0; }
.story-scroll-container { width: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 10px; background: #fff; border: 2px inset var(--border-dark); }
.story-track { display: inline-flex; gap: 10px; padding: 10px; }
.story-card { display: inline-block; width: 110px; text-align: center; white-space: normal; vertical-align: top; text-decoration: none;}
.story-card img { width: 100%; height: 150px; object-fit: cover; border: 2px solid #000; }
.story-card p { font-size: 14px; line-height: 1.2; margin-top: 5px; color: var(--text-color); font-weight: bold; background: var(--window-bg); border: 1px solid var(--border-dark);}
.story-card:hover p { background: var(--title-color); color: white; }
.taskbar {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 45px; background: #c0c0c0; border-top: 3px solid #fff;
    display: flex; align-items: center; padding: 0 10px; gap: 10px; z-index: 9999;
}
.start-btn { background: #dfdfdf; border: 2px solid; border-color: #fff #000 #000 #fff; font-weight: bold; padding: 5px 15px; display: flex; align-items: center; gap: 5px; color: black; font-size: 16px; }
.taskbar-tools { display: flex; gap: 5px; margin-left: auto; align-items: center;}
.tool-btn { background: #dfdfdf; border: 2px solid; border-color: #fff #848484 #848484 #fff; width: 35px; height: 35px; display: flex; justify-content: center; align-items: center; font-size: 18px; position: relative; color: black;}
.tool-btn:active { border-color: #848484 #fff #fff #848484; }
.tool-btn input[type="color"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer;}
.font-select { background: #fff; border: 2px inset var(--border-dark); padding: 5px; font-family: inherit; font-weight: bold;}
.read-box { max-width: 900px; margin: 20px auto; }
.story-content { background: #fff; padding: 20px; border: 2px inset var(--border-dark); font-size: var(--text-size); line-height: 1.6; text-align: justify; margin: 15px 0; max-width: 100%; word-wrap: break-word; overflow-wrap: break-word; font-family: inherit !important; }
body.dark-mode .story-content { background: #1a1a1a; }
.music-player-os { background: #000; padding: 10px; border: 2px inset var(--border-dark); }
.mp-screen { background: #000; color: #0f0; border: 2px inset #555; padding: 5px; margin-bottom: 10px; font-size: 16px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--border-dark); border: 2px inset var(--border-dark); padding: 2px; }
.cal-date { background: #fff; text-align: center; padding: 5px 0; font-size: 14px; color: black; }
.cal-today { background: var(--title-color) !important; color: white; }
#draw-board { width: 100%; height: 160px; display: block; background: url('https://sakuraducky.neocities.org/graphics/grid_bg.png') #fff; }
.paint-tools { padding: 5px; background: #dfdfdf; border-top: 2px solid #fff; display: flex; justify-content: space-between; }
iframe { width: 100%; border: 2px inset var(--border-dark); background: #fff;}
.magic-sparkle {
    position: absolute;
    pointer-events: none;
    color: #ff1493;
    text-shadow: 0 0 5px #ffb7e2;
    font-size: 18px;
    animation: floatUp 1s forwards;
    z-index: 9999;
}
.click-burst {
    position: absolute;
    pointer-events: none;
    color: #ff69b4;
    text-shadow: 0 0 8px #ff1493;
    font-size: 20px;
    animation: burstOut 0.6s forwards;
    z-index: 10000;
}
@keyframes floatUp { 0% { transform: scale(0.5) translateY(0); opacity: 1; } 100% { transform: scale(1.5) translateY(-30px); opacity: 0; } }
@keyframes burstOut { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(2) translateY(-20px); opacity: 0; } }
@keyframes float { 0% { transform: translateY(0); } 100% { transform: translateY(-15px); } }
@media screen and (max-width: 1024px) { .desktop-grid { grid-template-columns: 1fr; } }
.toc-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6); z-index: 10001; 
}
.toc-modal {
    display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90%; max-width: 400px; max-height: 80vh; z-index: 10002;
    overflow-y: auto;
}
.toc-modal::-webkit-scrollbar { width: 10px; }
.novel-info-header { display: flex; gap: 20px; margin-bottom: 20px; }
.novel-info-text { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.novel-info-text p { margin: 0; background: var(--inner-bg); border: 2px inset var(--border-dark); padding: 5px 10px; }
@media screen and (max-width: 768px) {
    .anime-mascot { display: none !important; } 
    .main-grid, .desktop-grid { grid-template-columns: 1fr; }
    .novel-info-header { flex-direction: column; align-items: center; text-align: center; }
    .top-menu-bar { overflow-x: auto; white-space: nowrap; padding-bottom: 5px;}
    .top-menu-bar::-webkit-scrollbar { height: 4px; }
    .taskbar { padding-right: 15px; }
    .taskbar-tools { 
        overflow-x: auto; white-space: nowrap; 
        padding-bottom: 5px; margin-top: 5px; gap: 8px;
    }
    .taskbar-tools::-webkit-scrollbar { height: 0; }
    .start-btn { flex-shrink: 0; }
}
@media (max-width: 768px) {
    .desktop-grid {
        display: flex;
        flex-direction: column;
    }
    .col {
        display: contents;
    }
    #win-system   { order: 1; }
    #win-updates  { order: 2; }
    #win-done     { order: 3; }
    #win-wip      { order: 4; }
    #win-chat     { order: 5; }
    #win-music    { order: 6; }
    #win-paint    { order: 7; }
    #win-calendar { order: 8; }
}
.story-content {
    line-height: 1.6 !important;
}
.story-content p {
    margin-top: 0;
    margin-bottom: 12px;
}
#chapter-list, #modal-chapter-list {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start;
}
.win-btn {
    flex: 1 1 auto;
    text-align: center;
    max-width: 100%;
    word-break: break-word;
}
.read-box {
    transform: translateZ(0);
}
.font-size-container {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #fff #848484 #848484 #fff;
    padding: 0 8px;
    height: 35px;
    color: black;
}
#font-size-slider {
    width: 60px;
    cursor: pointer;
    accent-color: #ff1493;
}
@media screen and (max-width: 768px) {
    #font-size-slider {
        width: 40px;
    }
    .font-size-container {
        padding: 0 4px;
        gap: 2px;
    }
}
