.window {
    position: absolute;
    resize: both;
    overflow: auto;
    min-width: 300px;
    min-height: 180px;
    max-width: 90vw;
    max-height: 80vh;

    background: rgba(135, 106, 173, 0.58);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 5px solid rgba(151, 151, 151, 0.18);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: white;

    transform-origin: center;
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

.window:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.4),
        0 5px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.titlebar {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 14px;
    background: rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
    cursor: grab;
}

.titlebar:active {
    cursor: grabbing;
}

.title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.title img {
    width: 25px;
    height: 25px;

    object-fit: cover;
    border-radius: 7px;
    box-shadow:
   0 2px 8px rgba(0, 0, 0, 0.25);
}

.closeButton {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: crimson;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.closeButton:hover {
    background: red;
}

.windowContent{
    padding:20px;
    overflow-y:auto;
    flex:1;
}

.luckyTheme {
    background-image: url("Lucky.jpeg") !important;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.forestTheme {
    background-image: url("Forest.jpg") !important;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.spaceTheme {
    background-image: url("Glass.jpg") !important;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.notepadContent {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f5f3ff;
}

.notepadTop {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background: #e9e2ff;
    color: #4b278a;
    font-weight: bold;
}

#savedText {
    font-size: 13px;
    font-weight: normal;
}

#noteArea {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    border: none;
    outline: none;
    resize: none;
    padding: 20px;
    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    background: #ffffff;
    color: #222;
}

.notepadBottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #e9e2ff;
    color: #5b2cc7;
    font-size: 13px;
}

#saveNote {
    border: none;
    background: #5b2cc7;
    color: white;
    padding: 8px 18px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
}

#saveNote:hover {
    background: #7b45e8;
}

.window.opening {
    animation: windowOpen 0.35s ease forwards;
}

.window.closing {
    animation: windowClose 0.35s ease forwards;
}

@keyframes windowOpen {
    from {
        opacity: 0;
        transform: scale(0.50) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes windowClose {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.40) translateY(10px);
    }
}

#desktopApps img {
    transition: 0.2s ease;
}
#desktopApps img:hover {
    transform: translateY(-5px) scale(1.15);
    filter: brightness(1.15);
}

#taskbar {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    box-sizing: border-box;

    background: rgba(20, 20, 30, 0.65);
    backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.35),
        inset 0 1px rgba(255, 255, 255, 0.15);

    color: white;

    z-index: 9999;
}

.taskbarLeft {
    display: flex;
    align-items: center;
    min-width: 150px;
}

.taskbarText {
    display: flex;
    flex-direction: column;
}

.taskbarTitle {
    font-size: 17px;
    font-weight: bold;
}

.taskbarSub {
    font-size: 11px;
    opacity: 0.6;
}

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

.taskButton {
    margin: 0;
    padding: 9px 14px;

    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;

    background: rgba(255,255,255,0.08);
    color: white;

    cursor: pointer;

    transition:
        background 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}

.taskButton:hover {
    background: rgba(255,255,255,0.16);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.taskButton:active {
    transform: scale(0.95);
}

.taskbarRight {
    display: flex;
    align-items: center;
    gap: 10px;
}
.taskbarReminder {
    font-size: 12px;
    padding: 7px 10px;
    background: rgba(255,255,255,0.07);
    border-radius: 9px;
    opacity: 0.85;
}
#taskbarTime {
    min-width: 85px;
    text-align: center;
    padding: 7px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 12px;
}

.minimizeButton {
    width: 32px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.918);
    font-size: 15px;
    cursor: pointer;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}
.minimizeButton:hover {
    background: rgba(255, 255, 255, 0.12);
}
.minimizeButton:active {
    transform: scale(0.9);
}

.closeButton {
    width: 32px;
    height: 30px;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.918);
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}
.closeButton:hover {
    background: rgba(255, 70, 70, 0.75);
}
.closeButton:active {
    transform: scale(0.9);
}

#openApps {
    display: flex;
    gap: 8px;
    align-items: center;
}
.openApp {
    height: 36px;
    padding: 0 14px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(119, 0, 255, 0.1);
    color: white;
    font-size: 13px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 3px 10px rgba(0, 0, 0, 0.12);
    transition:
        background 0.18s ease,
        transform 0.18s ease,
        border-color 0.18s ease;
}
.openApp:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}
.openApp:active {
    transform: scale(0.96);
}
.openApp.active {
    background: rgba(103, 207, 54, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(70, 68, 68, 0.15),
        0 0 15px rgba(255, 255, 255, 0.08);
}

.window.minimizing {
    animation: minimizeWindow 0.25s ease forwards;
}
@keyframes minimizeWindow {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.5);
        opacity: 0;
    }
}

#calendarWidget {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 250px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(173, 142, 202, 0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 10px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    color: white;
    z-index: 5;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.calendarHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#calendarMonth {
    font-size: 20px;
    font-weight: bold;
}

#calendarYear {
    opacity: 0.6;
}

.calendarWeek,
.calendarDays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}

.calendarWeek {
    margin-bottom: 8px;
    font-size: 10px;
    opacity: 0.55;
}

.calendarDays span {
    padding: 7px 0;
    border-radius: 8px;
    font-size: 13px;
}

.calendarDays span.today {
    background: rgba(255, 255, 255, 0.25);
    font-weight: bold;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.settingsContent {
    padding: 25px;
    color: white;
}

.settingsTitle {
    margin-bottom: 25px;
}

.settingsTitle span {
    font-size: 30px;
    font-weight: bold;
}
.settingsTitle p {
    margin-top: 5px;
    opacity: 0.6;
}
.settingsSection {
    padding: 18px;
    margin-bottom: 15px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settingsSection h3 {
    margin-top: 0;
    margin-bottom: 15px;
}
.settingItem {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settingItem strong {
    font-size: 15px;
}

.settingItem p {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: 0.55;
}
.wallpaperButtons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.backgroundButton {
    padding: 9px 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transition: 0.2s;
}
.backgroundButton:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.systemStatus {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(50, 220, 120, 0.15);
    font-size: 12px;
}
.toggle {
    position: relative;
    width: 45px;
    height: 24px;
}
.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggleSlider {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: 0.25s;
}

.toggleSlider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: white;
    transition: 0.25s;
}
.toggle input:checked + .toggleSlider {
    background: rgba(100, 150, 255, 0.7);
}
.toggle input:checked + .toggleSlider:before {
    transform: translateX(21px);
}

body {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: background 0.8s ease;
}

body.luckyTheme {
    background-image:
        radial-gradient(circle at 30% 20%, rgba(180, 140, 255, 0.35), transparent 40%),
        linear-gradient(135deg, #3a2a5d, #1c1330);
    background-size: 130% 140%;
    animation: luckyMove 60s ease-in-out infinite;
}

body.forestTheme {
    background-image:
        radial-gradient(circle at 70% 30%, rgba(120, 200, 140, 0.35), transparent 40%),
        linear-gradient(135deg, #1f3d2b, #0e2016);
    background-size: 180% 180%;
    animation: forestMove 60s ease-in-out infinite;
}

body.glassTheme {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(100, 180, 255, 0.4), transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(180, 100, 255, 0.35), transparent 35%),
        radial-gradient(circle at 50% 90%, rgba(50, 220, 200, 0.3), transparent 35%),
        linear-gradient(120deg, #10182d, #30204d, #102f3d);
    background-size: 200% 200%;
    animation: glassMove 30s ease-in-out infinite;
}

body.spaceTheme {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.15), transparent 30%),
        radial-gradient(circle at 75% 75%, rgba(120, 100, 255, 0.35), transparent 40%),
        linear-gradient(135deg, #05060f, #150c2e);
    background-size: 120% 140%;
    animation: purpleMove 30s ease-in-out infinite;
}
@keyframes luckyMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes forestMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes glassMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes purpleMove {
    0% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 100% 50%;
    }
}

#notepad { display: none; flex-direction: column; min-width: 420px; min-height: 300px; width: 600px; height: 500px; }
#notepad .notepadContent { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
#notepad #noteArea { flex: 1; min-height: 0; width: 100%; box-sizing: border-box; resize: none; overflow: auto; }
#notepad .notepadTop, #notepad .notepadBottom { flex-shrink: 0; }
#calculator {
    width: 350px;
    min-width: 350px;
    height: 500px;
}

.calculatorContent {
    padding: 20px;
    box-sizing: border-box;
}

#calculatorDisplay {
    width: 100%;
    height: 75px;
    box-sizing: border-box;

    margin-bottom: 15px;
    padding: 10px 15px;

    border: none;
    border-radius: 12px;

    background: rgba(0, 0, 0, 0.35);
    color: white;

    font-size: 32px;
    text-align: right;

    outline: none;
}

.calculatorButtons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calculatorButton {
    height: 60px;

    border: none;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.12);
    color: white;

    font-size: 20px;
    cursor: pointer;

    transition: 0.15s;
}

.calculatorButton:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.calculatorButton:active {
    transform: scale(0.94);
}

.calculatorButton.operator {
    background: rgba(120, 60, 200, 0.45);
}

.calculatorButton.equals {
    background: rgba(70, 190, 100, 0.45);
    grid-row: span 2;
    height: 128px;
}

.calculatorButton.clear {
    background: rgba(220, 60, 60, 0.45);
}

.calculatorButton.zero {
    grid-column: span 2;
}
#userSettings {
    width: 500px;
    min-width: 400px;
    height: 500px;
}

.userSettingsContent {
    padding: 25px;
    color: white;
    overflow-y: auto;
}

.userSettingsTitle {
    margin-bottom: 25px;
}

.userSettingsTitle span {
    font-size: 30px;
    font-weight: bold;
}

.userSettingsTitle p {
    margin-top: 5px;
    opacity: 0.6;
}

.userSettingsSection {
    padding: 18px;
    margin-bottom: 15px;

    border-radius: 16px;

    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.userSettingsSection h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.userSettingsSection label {
    display: block;
    margin-bottom: 8px;
    opacity: 0.7;
}

.userSettingsSection input {
    width: 100%;
    box-sizing: border-box;

    padding: 12px;

    border: none;
    border-radius: 10px;

    background: rgba(0, 0, 0, 0.25);
    color: white;

    font-size: 15px;

    outline: none;
}

.userSettingsSection input:focus {
    background: rgba(0, 0, 0, 0.35);
}

.userSettingsButtons {
    display: flex;
    gap: 10px;
}

.userSettingsButtons button {
    padding: 10px 20px;

    border: none;
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.12);
    color: white;

    cursor: pointer;

    transition: 0.2s;
}

.userSettingsButtons button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

#saveUserSettings {
    background: rgba(70, 190, 100, 0.35);
}

#resetUserSettings {
    background: rgba(220, 60, 60, 0.35);
}

#userSettingsStatus {
    margin-top: 15px;
    opacity: 0.7;
}
.titlebar > div:last-child {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.calendarDays span.birthday {
    background: rgba(255, 180, 80, 0.45);
    box-shadow: 0 0 15px rgba(255, 180, 80, 0.45);
    font-weight: bold;
}
#browser {
    width: 800px;
    height: 600px;
    min-width: 500px;
    min-height: 350px;
    display: none;
    flex-direction: column;
}

.browserContent {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.browserToolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.15);
}

.browserToolbar button {
    width: 38px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.browserToolbar button:hover {
    background: rgba(255, 255, 255, 0.22);
}

#browserURL {
    flex: 1;
    height: 34px;
    box-sizing: border-box;
    border: none;
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(0, 0, 0, 0.25);
    color: white;
    outline: none;
}

#browserURL::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#browserFrame {
    flex: 1;
    width: 100%;
    border: none;
    background: white;
}
#cmd {
    width: 600px;
    min-width: 450px;
    height: 400px;
    background: rgba(8, 8, 12, 0.92);
}

.cmdContent {
    height: calc(100% - 46px);
    box-sizing: border-box;
    padding: 15px;
    overflow-y: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    color: #eeeeee;
}

#cmdOutput {
    white-space: pre-wrap;
    word-break: break-word;
}

.cmdInputLine {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.cmdPrompt {
    color: #7cff8a;
    margin-right: 8px;
    white-space: nowrap;
}

#cmdInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: white;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
}

.cmdGreen {
    color: #7cff8a;
}

.cmdBlue {
    color: #72a7ff;
}

.cmdRed {
    color: #ff7070;
}