/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    overflow: hidden;
    font-family: Tahoma, "MS Sans Serif", Geneva, sans-serif;
    font-size: 11px;
    cursor: default;
    /* Bliss wallpaper: sky + clouds + hills */
    background:
        radial-gradient(ellipse 180px 80px at 15% 16%, rgba(255,255,255,0.8) 0%, transparent 70%),
        radial-gradient(ellipse 240px 90px at 45% 10%, rgba(255,255,255,0.75) 0%, transparent 70%),
        radial-gradient(ellipse 140px 60px at 70% 20%, rgba(255,255,255,0.7) 0%, transparent 70%),
        radial-gradient(ellipse 280px 100px at 30% 6%, rgba(255,255,255,0.65) 0%, transparent 70%),
        radial-gradient(ellipse 120px 55px at 82% 14%, rgba(255,255,255,0.6) 0%, transparent 70%),
        radial-gradient(ellipse 160px 70px at 58% 24%, rgba(255,255,255,0.55) 0%, transparent 70%),
        linear-gradient(
            180deg,
            #1a56d6 0%,
            #2e74e4 15%,
            #4a92f0 30%,
            #6dade6 45%,
            #8ec5f5 55%,
            #a5d6fa 62%,
            #4dad3c 64%,
            #4a9e30 72%,
            #3d8a28 80%,
            #357a22 90%,
            #2d6a1c 100%
        );
    background-attachment: fixed;
    background-size: cover;
}

/* ===== DESKTOP ICONS ===== */
.desktop-icons {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 6px 10px;
    cursor: pointer;
    width: 80px;
    text-align: center;
    color: #fff;
    font-family: Tahoma, sans-serif;
}

.desktop-icon:hover,
.desktop-icon:focus {
    background: rgba(70, 130, 230, 0.35);
    border-color: rgba(100, 160, 255, 0.6);
}

.icon-graphic {
    font-size: 32px;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
}

.icon-label {
    font-size: 11px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

/* ===== XP WINDOWS ===== */
.xp-window {
    position: absolute;
    border: 2px solid #0054e3;
    border-radius: 8px 8px 4px 4px;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.35);
    background: #fff;
    min-width: 320px;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.xp-window.minimized {
    display: none;
}

.xp-window.focused {
    z-index: 100;
}

.xp-window.dragging .title-bar {
    cursor: grabbing;
}

/* Title Bar */
.title-bar {
    background: linear-gradient(
        180deg,
        #0997ff 0%,
        #0053ee 8%,
        #0050ee 20%,
        #065ced 50%,
        #0662f1 80%,
        #0351dd 95%,
        #0244c4 100%
    );
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 6px 6px 0 0;
    cursor: grab;
    user-select: none;
    min-height: 28px;
}

.title-bar-text {
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
}

.title-icon {
    font-size: 14px;
}

.title-bar-controls {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.title-btn {
    width: 21px;
    height: 21px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    font-size: 9px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0;
    font-family: Tahoma, sans-serif;
}

.minimize-btn,
.maximize-btn {
    background: linear-gradient(180deg, #3c8df4 0%, #1c62cc 100%);
}

.close-btn {
    background: linear-gradient(180deg, #e88c6e 0%, #cf5234 50%, #c5472b 100%);
}

.title-btn:hover {
    filter: brightness(1.2);
}

.title-btn:active {
    filter: brightness(0.9);
}

/* Inactive window title bar */
.xp-window:not(.focused) .title-bar {
    background: linear-gradient(
        180deg,
        #9db9eb 0%,
        #7b9dd6 20%,
        #6e93ce 50%,
        #7b9dd6 80%,
        #8fadd8 100%
    );
}

/* Toolbar */
.toolbar {
    background: linear-gradient(180deg, #f2f1ed 0%, #ece9d8 100%);
    border-bottom: 1px solid #c0bbaa;
    padding: 2px 8px;
    display: flex;
    gap: 12px;
}

.toolbar-item {
    font-size: 11px;
    color: #1b1f2a;
    cursor: default;
    padding: 1px 2px;
}

.toolbar-item:hover {
    color: #003399;
}

/* Address Bar */
.address-bar {
    background: #ece9d8;
    border-bottom: 1px solid #c0bbaa;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.address-label {
    font-size: 11px;
    color: #444;
    flex-shrink: 0;
}

.address-field {
    background: #fff;
    border: 1px solid #7f9db9;
    padding: 1px 6px;
    font-size: 11px;
    flex: 1;
    color: #000;
    font-family: Tahoma, sans-serif;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Window Body */
.window-body {
    padding: 16px 20px;
    font-size: 12px;
    line-height: 1.6;
    color: #000;
    overflow-y: auto;
    max-height: 50vh;
}

.window-body h1 {
    font-size: 22px;
    margin: 0 0 4px;
    color: #003399;
    font-family: Tahoma, sans-serif;
}

.window-body h2 {
    font-size: 15px;
    margin: 0 0 6px;
    color: #003399;
    font-family: Tahoma, sans-serif;
}

.tagline {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin: 0 0 14px;
}

.about-content p {
    margin: 0 0 10px;
}

/* Status Bar */
.status-bar {
    display: flex;
    gap: 16px;
    padding: 4px 8px;
    background: #ece9d8;
    border-top: 1px solid #c0bbaa;
    font-size: 10px;
    color: #444;
    margin: 14px -20px -16px;
}

/* ===== XP BUTTONS ===== */
.xp-button {
    display: inline-block;
    padding: 4px 16px;
    background: linear-gradient(180deg, #fff 0%, #ece9d8 100%);
    border: 1px solid #003c74;
    border-radius: 3px;
    font-size: 11px;
    font-family: Tahoma, sans-serif;
    color: #000;
    cursor: pointer;
    text-decoration: none;
    box-shadow: inset 0 1px 0 #fff;
    margin-right: 6px;
    margin-top: 8px;
}

.xp-button:hover {
    background: linear-gradient(180deg, #fff 0%, #ddd8c0 100%);
}

.xp-button:active {
    background: linear-gradient(180deg, #d5d0be 0%, #ece9d8 100%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.xp-button-secondary {
    border-color: #808080;
}

/* ===== PROJECT CARDS ===== */
.project-card {
    display: flex;
    gap: 14px;
    padding: 12px;
    background: #f8f7f4;
    border: 1px solid #d6d2c2;
    border-radius: 3px;
    margin-bottom: 10px;
}

.project-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.project-info h2 {
    margin: 0 0 4px;
}

.project-info p {
    margin: 0 0 6px;
    font-size: 11px;
    color: #333;
}

.project-card-coming-soon {
    opacity: 0.6;
    border-style: dashed;
}

/* ===== ESSAYS PLACEHOLDER ===== */
.essays-placeholder {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.placeholder-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    font-size: 10px;
    color: #999;
}

/* ===== TASKBAR ===== */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: linear-gradient(
        180deg,
        #2457c5 0%,
        #1941a0 3%,
        #2252c7 6%,
        #1941a0 50%,
        #163b96 54%,
        #1236a0 100%
    );
    display: flex;
    align-items: center;
    z-index: 1000;
    padding: 0 2px;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.3);
}

/* Start Button */
.start-button {
    background: linear-gradient(180deg, #3e9f3e 0%, #378e37 15%, #2e7d2e 50%, #267a26 70%, #1e6c1e 100%);
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 2px 14px 2px 8px;
    height: 30px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    font-family: Tahoma, sans-serif;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    font-style: italic;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

.start-button:hover {
    filter: brightness(1.1);
}

.start-button:active {
    filter: brightness(0.9);
}

.start-logo {
    font-size: 16px;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
    color: #ff0000;
}

.start-text {
    letter-spacing: 0.5px;
}

.taskbar-divider {
    width: 2px;
    height: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.2) 100%);
    margin: 0 4px;
}

/* Taskbar Window Buttons */
.taskbar-windows {
    flex: 1;
    display: flex;
    gap: 3px;
    overflow: hidden;
    padding: 0 4px;
}

.taskbar-btn {
    background: linear-gradient(180deg, #3e6ebe 0%, #3058a0 50%, #28508c 100%);
    border: 1px solid #1a3f7a;
    border-radius: 2px;
    padding: 2px 10px;
    color: #fff;
    font-size: 11px;
    font-family: Tahoma, sans-serif;
    cursor: pointer;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 26px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.taskbar-btn:hover {
    filter: brightness(1.1);
}

.taskbar-btn.active {
    background: linear-gradient(180deg, #4a82cf 0%, #3c6ab8 50%, #3462ac 100%);
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
    border-color: #0e3070;
}

/* System Tray */
.taskbar-tray {
    background: linear-gradient(180deg, #1290e9 0%, #1074c9 50%, #0d5da8 100%);
    border-left: 1px solid rgba(0, 0, 0, 0.2);
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
}

#clock {
    color: #fff;
    font-size: 11px;
    font-family: Tahoma, sans-serif;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* ===== START MENU ===== */
.start-menu {
    position: fixed;
    bottom: 36px;
    left: 0;
    width: 380px;
    background: #fff;
    border: 2px solid #0054e3;
    border-radius: 8px 8px 0 0;
    box-shadow: 3px -3px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.start-menu.hidden {
    display: none;
}

.start-menu-header {
    background: linear-gradient(180deg, #1e6ec7 0%, #2883d4 50%, #1e6ec7 100%);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px 6px 0 0;
}

.start-menu-avatar {
    font-size: 36px;
    background: #c3d9f0;
    border-radius: 4px;
    padding: 2px 6px;
    border: 2px solid #fff;
    line-height: 1;
}

.start-menu-name {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.start-menu-body {
    display: flex;
    min-height: 200px;
}

.start-menu-left {
    flex: 1;
    padding: 8px 0;
    background: #fff;
    border-right: 1px solid #d6d2c2;
}

.start-menu-right {
    width: 150px;
    padding: 8px 0;
    background: #d3e5fa;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: none;
    border: none;
    font-size: 11px;
    font-family: Tahoma, sans-serif;
    cursor: pointer;
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: #000;
}

.start-menu-item:hover {
    background: #2b71b5;
    color: #fff;
}

.start-menu-divider {
    height: 1px;
    background: #d6d2c2;
    margin: 4px 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        padding-bottom: 44px;
    }

    .desktop-icons {
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        top: auto;
        left: auto;
        padding: 12px;
    }

    .xp-window {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: calc(100% - 16px) !important;
        margin: 8px auto;
        max-height: none;
        min-width: 0;
    }

    .xp-window.minimized {
        display: flex;
    }

    .xp-window.minimized .toolbar,
    .xp-window.minimized .address-bar,
    .xp-window.minimized .window-body {
        display: block;
    }

    .window-body {
        max-height: none;
    }

    .taskbar {
        position: relative;
    }

    .start-menu {
        width: 100%;
    }

    .project-card {
        flex-direction: column;
    }
}
