:root {
    --bg-color: #1e1e2e;
    --window-bg: #252538;
    --window-header-bg: #31314a;
    --text-color: #cdd6f4;
    --border-color: #89b4fa;
    --font-family: monospace;
}

body {
    background-color: var(--bg-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

body.pastel-theme {
    --bg-color: #fff0f5;;
    --window-bg: #ffffff;
    --window-header-bg: #ffd1dc;
    --text-color: #4a3b4c;
    --border-color: #ff85a2;
}

body.pastel-theme #top {
    background-color: rgba(255, 209, 220, 0.7);
    border-bottom: 1px solid var(--border-color);
}

body.pastel-theme .window.active {
    border-color: #ff6584;
    box-shadow: 0 0 14px rgba(255, 101, 132, 0.65), 0 12px 30px rgba(0, 0, 0, 0.15);
}

body.pastel-theme .note-editor:empty::before {
    color: rgba(0, 0, 0, 0.35);
}

body.pastel-theme .remove-btn {
    background-color: #ffd1dc;
    color: var(--text-color);
    border-color: #ff85a2;
}

body.pastel-theme .remove-btn:hover {
    background-color: #ffb3c6;
}

#top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    padding: 0 16px;
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
}

.top-left-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

.top-bar-btn {
    cursor: pointer;
    font-weight: bold;
}

#desktopApps {
    padding-top: 50px;
    padding-left: 20px;
    display: flex;
    gap: 16px;
}

.icon-container {
    text-align: center;
    cursor: pointer;
    width: 70px;
}

.icon-container:hover .icon-box {
    transform: translateY(-2px);
    transition: transform 0.15s ease;
    border-color: var(--border-color);
}

.icon-box {
    width: 48px;
    height: 48px;
    background-color: var(--window-header-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 4px auto;
}

.icon-label {
    font-size: 12px;
    margin: 0;
}

.window {
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    position: absolute;
    background-color: var(--window-bg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    resize: both;
    overflow: auto;
}
.window.active {
    border-color: #89dceb;
    box-shadow: 0 0 12px rgba(137, 220, 235, 0.4), 0 12px 30px rgba(0, 0, 0, 0.6);
}

#welcome { top: 60px; left: 40px; width: 320px; }
#notes { top: 120px; left: 380px; width: 360px; display: none; }
#clicker { top: 100px; left: 760px; width: 300px; display: none; }
#settings { top: 140px; left: 200px; width: 280px; display: none; }

.note-editor {
    min-height: 120px;
    outline: none;
    margin: 0;
}

.note-editor:empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    display: block;
}

.notes-action-btn {
    margin-top: 10px;
    padding: 4px 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    background-color: var(--window-header-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.settings-label {
    font-size: 11px;
    font-weight: bold;
    margin: 0 0 6px 0;
    opacity: 0.8;
    text-transform: uppercase;
}

.settings-spacing {
    margin-top: 16px;
}

.settings-btn {
    width: 100%;
    padding: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    background-color: var(--window-header-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.remove-btn {
    margin-top: 8px;
    background-color: #31314a;
    color: #f38ba8;
    border-color: #f38ba8;
}

.remove-btn:hover {
    background-color: rgba(243, 139, 168, 0.15);
}

.drop-zone {
    margin-top: 10px;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 16px 10px;
    text-align: center;
    font-size: 11px;
    opacity: 0.8;
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.drop-zone.dragover {
    background-color: var(--border-color);
    color: var(--bg-color);
    opacity: 1;
}

.windowheader {
    width: 100%;
    height: 28px;
    display: flex;
    align-items: center;
    cursor: grab;
    justify-content: space-between;
    background-color: var(--window-header-bg);
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    box-sizing: border-box;
    padding: 0 8px;
}

.windowheader.dragging {
    cursor: grabbing;
}

.headertext {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
}

.header-spacer {
    width: 12px;
}

.closebutton {
    width: 12px;
    height: 12px;
    cursor: pointer;
    background-color: #f38ba8;
    border-radius: 50%;
}

.window-content {
    padding: 14px;
    font-size: 14px;
    overflow-y: auto;
    max-height: 300px;
}

.clicker-content {
    text-align: center;
}

#scoreDisplay {
    font-size: 32px;
    margin: 10px 0;
}

#cpsDisplay {
    font-size: 12px;
    margin-bottom: 15px;
    opacity: 0.8;
}

#clickBtn {
    font-size: 40px;
    background: none;
    border: none;
    cursor: pointer;
    transform: scale(1);
    transition: transform 0.08s ease-in-out;
}

.clicker-shop {
    margin-top: 20px;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
}

#upgradeBtn {
    padding: 6px 12px;
    cursor: pointer;
    font-family: inherit;
    background-color: var(--window-header-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

#upgradeStatus {
    color: #f38ba8;
    font-size: 11px;
    margin: 6px 0 0 0;
    height: 14px;
}