/*
Copyright © 2025 Zoe Gates (bloopybae)
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
https://creativecommons.org/licenses/by-nc-sa/4.0/
*/

:root {
    --bg-scale: 1; /* 1 = normal zoom */
    --bg-x: 0px; /* background-position X */
    --bg-y: 0px; /* background-position Y */
    --hue: 0deg; /* hue rotation */
}


html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}


body {
    background: transparent;
    font-family: 'Courier New', monospace;
    cursor: url("cursors/normal.cur"), auto;
}


#bgHue {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1; /* tint over wallpaper */
    mix-blend-mode: soft-light;
    background: rgba(255, 230, 247, 0.06);
    filter: hue-rotate(var(--hue, 0deg)) saturate(1.08);
}

#bgViz {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2; /* particles over hue tint */
}


.desktop {
    height: 100vh;
    width: 100vw;
    position: relative;
    cursor: url("cursors/normal.cur"), auto;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0; /* sits behind icons/windows, above page background */
    pointer-events: none;
    background-image: url("img/wallpaper.gif");
    background-repeat: repeat;
    background-position: calc(0px + var(--bg-x, 0px)) calc(0px + var(--bg-y, 0px));
    background-size: auto;
    transform: scale(var(--bg-scale, 1));
    filter: hue-rotate(var(--hue, 0deg));
    will-change: transform, filter;
}


/* Custom Cursors */
input,
textarea {
    cursor: url("cursors/text.cur"), text;
}

a {
    cursor: url("cursors/link.cur"), pointer;
}

button,
.browser-btn,
.close-btn,
#startButton {
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: url("cursors/link.cur"), pointer;
}

.title-bar {
    background: linear-gradient(to bottom, #ffe6f0, #ffb6d6);
    border-bottom: 1px solid rgba(212, 116, 157, 0.6);
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    color: #4a2a38;
    text-shadow: 0 1px #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    height: 24px;
    box-shadow: inset -1px -1px 0 #fff,
    inset 1px 1px 0 #e38cb2,
    0 1px 1px rgba(0, 0, 0, 0.1);
}

.title-bar,
.browser-header,
.chat-header {
    position: relative;
    border-radius: 14px 14px 0 0;        /* match .window radius on the top */
    overflow: hidden;                    /* keep gradient and content clean at corners */
}

.active-window > .title-bar::after,
.active-window > .browser-header::after,
.active-window > .chat-header::after {
    box-shadow:
            inset 0 0 0 1px rgba(0, 0, 0, 0.09),
            inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.title-bar::after,
.browser-header::after,
.chat-header::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    /* subtle inner stroke + soft lower divider so it doesn't look “cut” */
    box-shadow:
            inset 0 0 0 1px rgba(0, 0, 0, 0.06),      /* hairline around the cap */
            inset 0 -1px 0 rgba(0, 0, 0, 0.08);       /* bottom seam under the bar */
}

.title-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
    image-rendering: pixelated;
}


.resize-handle.horizontal {
    cursor: url("cursors/horizonta resize.cur"), ew-resize;
}

.resize-handle.vertical {
    cursor: url("cursors/vertical resize.cur"), ns-resize;
}

.resize-handle.upleft {
    cursor: url("cursors/uperleft.cur"), nwse-resize;
}

.resize-handle.upright {
    cursor: url("cursors/upper right.cur"), nesw-resize;
}

.icon-wrapper {
    position: absolute;
    width: 90px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    user-select: none;
    z-index: 5;
}

.icon-wrapper:hover .icon {
    filter: drop-shadow(0 0 3px var(--accent, #ff6ec7));
    transform: translateY(-1px);
    animation: pixelJitter 0.25s steps(2) infinite;
}

.icon-wrapper:hover .icon-label {
    color: var(--accent, #ff6ec7);
    text-shadow: 0 0 3px var(--accent, #ff6ec7);
}

@keyframes pixelJitter {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-1px, 1px); }
    100% { transform: translate(0, 0); }
}


.icon {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    margin-bottom: 4px;
}

.icon-label {
    font-size: 12px;
    line-height: 1.2;
    color: #222;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    padding: 1px 4px;
    pointer-events: none;
    max-width: 80px;
    word-wrap: break-word;
}

.window {
    position: absolute;
    width: 300px;
    border: none;
    background: #fff0f8;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
    display: none;
    z-index: 10;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center center;
}

.window.active-window {
    box-shadow: 0 4px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

.window:not(.active-window) {
    opacity: 0.95;
}

.window.about-window {
    position: absolute;
    width: 800px;
    height: auto;
    max-height: 90vh;
    min-width: 600px;
    min-height: 350px;
    border: none;
    background: #fff0f8;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
    display: none;
    z-index: 10;
    resize: both;
    overflow: auto;
}

.window.opening {
    animation: windowPopIn 0.25s ease forwards;
}

@keyframes windowPopIn {
    0% { transform: scale(0.85); opacity: 0; }
    80% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); }
}

.window.closing {
    animation: windowSquishOut 0.25s ease forwards;
}

@keyframes windowSquishOut {
    0% { transform: scale(1); opacity: 1; }
    20% { transform: scale(1.05); }
    100% { transform: scale(0.85); opacity: 0; }
}

.window.about-window .title-bar {
    position: sticky;
    top: 0;
    z-index: 1;
}


.window-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-right: 2px;
}

.min-btn,
.close-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    box-sizing: border-box;
    border: 1px solid #666;
    display: inline-grid;
    place-items: center;
    background: #f0f0f0;
}

.min-btn:hover,
.close-btn:hover {
    background: #e7e7e7;
}

.min-btn:active,
.close-btn:active {
    background: #dcdcdc;
}

.min-btn::before {
    content: "";
    width: 10px;
    height: 2px;
    background: black;
    display: block;
}

.close-btn::before,
.close-btn::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 2px;
    background: black;
    border-radius: 1px;
}

.close-btn::before {
    transform: rotate(45deg);
}

.close-btn::after {
    transform: rotate(-45deg);
}

.close-btn {
    background: #ffebef;
    border-color: #c06078;
    position: relative;
}

.close-btn::before,
.close-btn::after {
    background: #7a1b33;
}

.min-btn {
    background: #fff6d8;
    border-color: #c8a85a;
}

.min-btn::before {
    background: #6b571b;
}

.window-body {
    padding: 10px;
    font-size: 14px;
    color: #444;
}

textarea {
    width: 100%;
    height: auto;
    box-sizing: border-box;
    resize: vertical;
    font-family: 'Courier New', monospace;
    padding: 5px;
    border: 1px solid #ccc;
    background-color: #fff8fc;
    color: #333;
}

.window-body button {
    margin: 4px;
    background: #f69cd4;
    border: none;
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
}

#notepadApp {
    min-width: 300px;
    min-height: 200px;
    resize: both;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

#notepadApp .title-bar {
    flex: 0 0 24px;
    z-index: 1;
    border-bottom: 2px solid #d98bb6;
}

#notepadApp .window-body {
    flex: 1;
    overflow: hidden;
    background: #fff0f8;
    padding: 0;
}

#notepadApp textarea {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    padding: 8px;
    font-family: "Comic Sans MS", cursive;
    font-size: 14px;
    background: #fff0f8;
    resize: none;
    box-sizing: border-box;
    overflow: auto;
}


#startMenu {
    width: 220px;
    background: linear-gradient(to bottom, #ffe6f0, #ffd6e8);
    border: 2px solid #b080b0;
    padding: 6px;
    font-family: 'Courier New', monospace;
    position: absolute;
    bottom: 28px;
    left: 6px;
    display: none;
    z-index: 999;
    box-shadow: 2px 2px 0 #800050;
}

.start-icon {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    vertical-align: middle;
    image-rendering: pixelated;
}

.start-header {
    display: flex;
    align-items: center;
    padding: 6px;
    margin-bottom: 6px;
    border: 2px inset #fff;
    background: #ffeef8;
}

.start-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border: 2px outset #fff;
    margin-right: 6px;
}

.start-profile-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.start-username {
    font-weight: bold;
    font-size: 13px;
    color: #800050;
}

.start-tagline {
    font-size: 11px;
    color: #a06080;
}

.start-menu-items {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 13px;
    color: #400030;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.start-item {

    background: #ffeef8;
    padding: 4px 6px;
    border: 2px outset #fff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 13px;

    color: #400030;
    cursor: pointer;
}

.start-item:hover {
    background: #ffc4e2;
    border: 2px inset #aa77a0;
}

.start-folder {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 13px;
    color: #400030;
    position: relative;
    padding: 4px 6px;
    background: #ffeef8;
    border: 2px outset #fff;
    cursor: pointer;
}

.start-folder:hover {
    background: #ffc4e2;
    border: 2px inset #aa77a0;
}

.folder-label {
    font-weight: bold;
    font-size: 13px;
    color: #600040;
}

.start-submenu {
    display: none;
    position: absolute;
    bottom: 0;
    left: 100%;
    background: #ffeef8;
    border: 2px solid #b080b0;
    padding: 4px;
    z-index: 1000;
    min-width: 180px;
}

.start-folder:hover .start-submenu {
    display: block;
}


#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: linear-gradient(to bottom, #ffd9ec, #ffc3e6);
    border-top: 2px solid #e197c0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #82275f;
    box-shadow: inset 0 2px #fff,
    0 -1px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    backdrop-filter: blur(3px);
}

#taskbar-left {
    font-weight: bold;
}

#taskbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.taskbar-buttons {
    display: flex;
    gap: 4px;
    flex-grow: 1;
    justify-content: flex-start;
    padding-left: 8px;
}

.taskbar-btn {
    background: #f0f0f0;
    border: 2px outset #ccc;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.taskbar-btn.active {
    border: 2px inset #999;
    background: #d0d0d0;
}

.taskbar-icon {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}

.notification {
    position: fixed;
    bottom: 40px;
    right: 10px;
    background: #fff8fc;
    border: 2px solid #e197c0;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #222;
    z-index: 999;
    animation: fadeInOut 6s ease-in-out forwards;
}

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


#selfieWindow {
    z-index: 20;
}

.blinky-frame {
    display: inline-block;
    padding: 4px;
    border: 4px dashed hotpink;
    animation: blink 0.5s infinite alternate;
    background-color: #fff0f8;
    box-shadow: 0 0 10px #ff8dd4,
    0 0 20px #ff8dd4;
    border-radius: 12px;
}

@keyframes blink {
    0% {
        border-color: hotpink;
        box-shadow: 0 0 10px #ff8dd4;
    }
    100% {
        border-color: deeppink;
        box-shadow: 0 0 20px #ff33a6;
    }
}

.about-body {
    padding: 0;
    max-height: 420px;
    overflow: auto;
}

.about-shell {
    display: grid;
    grid-template-columns: 160px 1fr;
    min-height: 280px;
    background: #fffafc;
    border: 2px inset #c0a0b6;
}

.about-nav {
    background: linear-gradient(to bottom, #ffe6f2, #ffd3e8);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.about-tab-btn {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    text-align: left;
    padding: 6px 8px;
    color: #6a2a4e;
    background: #fff0f8;
    cursor: pointer;
}

.about-tab-btn.active {
    background: #ef81cd;
    border: 2px inset #b884a6;
}

.about-panels {
    padding: 10px 12px;
}

.about-panel {
    display: none;
}

.about-panel.active {
    display: block;
}

.identity-wrap {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: start;
}

.avatar-frame {
    width: 64px;
    height: 64px;
    padding: 2px;
    background: #fff;
    border: 2px inset #c0a0b6;
    box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #888;
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 6px 10px;
    font-size: 13px;
}

.about-grid .k {
    color: #82275f;
    font-weight: bold;
}

.about-grid .v {
    color: #333;
}

.muted {
    color: #987;
    font-style: italic;
}

.status-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    background: #ffd9ec;
    color: #6a2a4e;
    border: 1px solid #e197c0;
    box-shadow: 0 0 6px rgba(255, 110, 199, .35);
}

.about-section-title {
    margin: 6px 0 4px;
    font-weight: bold;
    color: #82275f;
}

.taglist {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.taglist li {
    background: #ffe6f5;
    border: 1px solid #e197c0;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: bold;
    color: #6a2a4e;
}

.swatches {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.sw {
    width: 28px;
    height: 18px;
    border-radius: 4px;
    background: var(--c);
    border: 1px solid rgba(0, 0, 0, .2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset;
}


.about-badges {
    margin-top: 1em;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    background: #ffc6e0;
    border: 1px solid #cc88a5;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-family: "Courier New", monospace;
    box-shadow: 1px 1px 0 #e197c0;
    white-space: nowrap;
    cursor: default;
    user-select: none;
    transition: background 0.2s, transform 0.1s;
}

.badge:hover {
    background: #ffb0d3;
    transform: translateY(-1px);
}


.mail-table {
    width: 100%;
    font-family: 'Courier New', monospace;
    border-collapse: collapse;
    font-size: 13px;
}

.mail-table th,
.mail-table td {
    border-bottom: 1px solid #ddd;
    padding: 4px;
    text-align: left;
}

.mail-table tr:hover {
    background-color: #ffe6f2;
    cursor: url("cursors/link.cur"), pointer;
}

.mail-thread {
    background: #fff0f8;
    padding: 8px;
    border: 1px dashed #f69cd4;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    height: 160px;
    overflow-y: auto;
    margin: 8px 0;
}

.mail-message {
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.mail-message.you {
    color: #444;
}

.mail-message.them {
    color: #82275f;
    font-style: italic;
}

#replyInput {
    width: 100%;
    font-family: 'Courier New', monospace;
    border: 1px solid #ddd;
    padding: 5px;
    background: #fff;
    box-sizing: border-box;
}

.browser-window {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.browser-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background-color: #ffecf7;
    border: 1px solid #e197c0;
    border-radius: 6px;
}

.browser-btn {
    background: #f69cd4;
    color: white;
    font-weight: bold;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.browser-address {
    flex: 1;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    background: white;
    font-size: 13px;
}

.browser-tabs {
    display: flex;
    gap: 4px;
    padding: 0 4px;
}

.tab {
    background: #ffd9ec;
    padding: 4px 8px;
    border: 1px solid #e197c0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    color: #82275f;
}

.active-tab {
    background: #fff0f8;
    color: #000;
}

.browser-content {
    padding: 8px;
    background: #fff0f8;
    border: 1px solid #e197c0;
    border-radius: 0 0 6px 6px;
    font-size: 14px;
    color: #333;
}

.browser-content h3 {
    margin-top: 0;
    color: #c22882;
}

.browser-links {
    list-style-type: none;
    padding-left: 0;
}

.browser-links li {
    margin: 4px 0;
}

.browser-links a {
    color: #c22882;
    text-decoration: none;
}

.browser-links a:hover {
    text-decoration: underline;
}


#musicApp .window-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px;
    gap: 10px;
}


#musicApp h3,
#musicApp strong#nowPlaying {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #82275f;
    background: #ffd9ec;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e197c0;
    text-align: center;
}

#musicApp audio {
    width: 100%;
    border-radius: 8px;
    background: white;
    border: 1px solid #e197c0;
    padding: 4px;
}

#musicApp .controls {
    display: flex;
    gap: 8px;
    justify-content: center;
}

#musicApp .controls button {
    background: #f69cd4;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

#musicApp .controls button:hover {
    background: #ef81cd;
}

#playlist {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #ffeef8;
    border: 1px solid #e197c0;
    border-radius: 8px;
}

#playlist li {
    padding: 6px 10px;
    border-bottom: 1px solid #f4c6dc;
    font-size: 13px;
    cursor: pointer;
}

#playlist li:hover {
    background: #ffc4e2;
}

#playlist li.playing {
    background: linear-gradient(90deg, #ffd9ec, #ffc4e2);
    font-weight: bold;
    color: #82275f;
}


.custom-player {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffeef8;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #e197c0;
    box-shadow: 2px 2px 0 #e197c0;
    font-family: 'Courier New', monospace;
}

.top-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#seekBar {
    flex: 1;
    height: 10px;
    accent-color: #f69cd4;
}

#volumeBar {
    width: 80px;
    height: 10px;
    accent-color: #f69cd4;
}

.main-controls {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.main-controls button {
    background: #f69cd4;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.main-controls button:hover {
    background: #ef81cd;
}


#mailApp {
    resize: both;
    overflow: auto;
    min-width: 300px;
    min-height: 200px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 6px;
    font-size: 13px;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: #ffe6f2;
    border: 1px solid #e197c0;
    border-radius: 6px;
    font-weight: bold;
    position: relative;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}

.chat-title {
    flex: 1;
}

.small-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f69cd4;
    color: white;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    background: #fff0f8;
    border: 1px dashed #f69cd4;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
}

.message-bubble {
    display: inline-block;
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 18px;
    line-height: 1.3;
    word-wrap: break-word;
    font-size: 13px;
    position: relative;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.message-bubble.you {
    align-self: flex-end;
    background: #daf1ff;
    border: 1px solid #a1d1f0;
    margin-left: auto;
}

.message-bubble.them {
    align-self: flex-start;
    background: #ffe6f2;
    border: 1px solid #e197c0;
    margin-right: auto;
}

.message-bubble .sender-name {
    font-weight: bold;
    font-size: 11px;
    color: #444;
    margin-bottom: 2px;
}

.message-meta {
    font-size: 9px;
    color: #777;
    text-align: right;
    margin-top: 4px;
}

.chat-input-wrapper {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

#bloopchatInput {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #e197c0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    background: white;
}

#sendBloop {
    background: #f69cd4;
    border: none;
    border-radius: 8px;
    padding: 0 12px;
    font-weight: bold;
    cursor: pointer;
    color: white;
}

.subtle-hint {
    font-size: 10px;
    color: #555;
    margin-top: 4px;
    text-align: center;
}

.sparkle-canvas {
    position: absolute;
    pointer-events: none;
    z-index: 9999;
}

.explorer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px;
    position: relative;
    z-index: 2;
}

.explorer-icon {
    width: 64px;
    text-align: center;
    font-size: 12px;
    cursor: default;
    z-index: 2;
}

.explorer-icon img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    pointer-events: none;
}

.icon-label {
    margin-top: 4px;
    color: black;
}

.text-viewer {
    white-space: pre-wrap;
    background: #fff;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 8px;
    border: 2px inset #c0c0c0;
    max-height: 300px;
    overflow-y: auto;
    color: #000;
    line-height: 1.4;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: auto;
}

.overlay-boot {
    background: #a8447e;
    color: #ffe6f7;
    font-family: "Courier New", monospace;
    display: grid;
    grid-template-rows: 1fr auto;
}

.post-container {
    padding: 16px;
    white-space: pre-wrap;
    line-height: 1.28;
    font-size: 14px;
    text-shadow: 0 0 4px rgba(255, 230, 247, 0.4), 0 0 8px rgba(255, 230, 247, 0.2);
    animation: cuteGlow 3s ease-in-out infinite alternate;
    overflow: hidden;
}

@keyframes cuteGlow {
    0% {
        text-shadow: 0 0 4px rgba(255, 230, 247, 0.4), 0 0 8px rgba(255, 230, 247, 0.2);
    }
    100% {
        text-shadow: 0 0 6px rgba(255, 230, 247, 0.6), 0 0 12px rgba(255, 230, 247, 0.3);
    }
}


#postText {
    margin: 0;
}

.splash {
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(1200px 400px at 50% 110%, rgba(255, 105, 180, 0.15), transparent),
    linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2));
    animation: bootSplashFade 300ms ease-out both;
}

.splash-inner {
    width: min(560px, 90vw);
    text-align: center;
}

.boot-logo {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 105, 180, 0.7);
    margin-bottom: 16px;
}

.boot-logo span {
    color: #ff6ec7;
}

.progress {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    overflow: hidden;
}

.progress .bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff6ec7, #ffd1e9);
    box-shadow: 0 0 10px #ff6ec7;
    transition: width 300ms ease;
}

.hint {
    margin-top: 10px;
    color: #d8ffd8;
    font-size: 12px;
    opacity: 0.9;
}

@keyframes bootSplashFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.overlay-shutdown.active .shutdown-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    transform: scaleY(1);
    animation: crtCollapse 800ms ease-in forwards;
}

@keyframes crtCollapse {
    0% {
        opacity: 0;
        transform: scaleY(1);
        filter: blur(0px) brightness(1);
    }
    40% {
        opacity: 1;
        transform: scaleY(0.06);
        filter: blur(0.3px) brightness(1.4);
    }
    70% {
        opacity: 1;
        transform: scaleY(0.02);
        filter: blur(0.6px) brightness(1.6);
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        filter: blur(1px) brightness(0.2);
    }
}

.overlay-shutdown {
    background: black;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: pink;
    font-family: 'Courier New', monospace;
}

.overlay-shutdown.active {
    display: grid;
}

.overlay-shutdown .goodbye-message {
    font-size: 24px;
    animation: fadeOutGoodbye 1.5s ease forwards;
}

@keyframes fadeOutGoodbye {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.overlay-shutdown .poweroff-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
}

.overlay-shutdown .power-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
}

.overlay-shutdown .power-button img {
    width: 96px; /* big and chunky */
    height: auto;
    image-rendering: pixelated;
    animation: pulseGlow 2s infinite ease-in-out;
}

.overlay-shutdown .power-button span {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #ffb6d9;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(255, 182, 217, 0.6);
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px pink);
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 8px hotpink);
    }
}


.overlay-shutdown .hint {
    font-size: 12px;
    color: #ffb6d9;
    opacity: 0.85;
    font-style: italic;
}

/* CRT overlay */
body[data-crt="on"]::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    background:
            repeating-linear-gradient(
                    to bottom,
                    rgba(255,255,255,0.03),
                    rgba(255,255,255,0.03) 1px,
                    transparent 1px,
                    transparent 2px
            ),
            url('img/noise.png');
    opacity: 0.25;
    z-index: 9999;
}



#idleRPG {
    display: none;
    width: 1200px;
    flex-direction: column;
}

#idleRPG .window-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#idleRPG .idleRPG-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#idleRPG .rpg-log {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

#idleRPG .rpg-tabs button:last-child {
    background: #ffb3b3;
    border: 1px solid #e197c0;
}

#idleRPG .rpg-tabs button:last-child:hover {
    background: #ff9999;
}