/* ====== RESET & BASE ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
    overflow: hidden;
    background: #000;
    width: 100vw;
    height: 100vh;
    user-select: none;
}

/* ====== LOADING SCREEN (WinXP style) ====== */
#loadingScreen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease;
}
#loadingContainer {
    text-align: center;
}
#loadingLogo {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#loadingLogoImg {
    width: 280px;
    height: 280px;
    object-fit: contain;
}
#loadingLogoText {
    text-align: center;
}
#loadingXP {
    font-family: 'Tahoma', sans-serif;
    font-weight: 300;
    font-size: 34px;
    color: white;
    letter-spacing: 4px;
}
#loadingXPSpan {
    color: #3a8aff;
    font-weight: bold;
    font-size: 34px;
    letter-spacing: 2px;
}
#loadingBlocksTrack {
    width: 160px;
    height: 16px;
    margin: 0 auto 12px auto;
    position: relative;
    overflow: hidden;
    background: #2a2a2a;
    border: 2px solid #555;
    border-radius: 4px;
}
#loadingBlocksInner {
    position: absolute;
    top: 0;
    left: 0;
    width: 160px;
    height: 16px;
}
#loadingBlocksInner.animating {
    animation: blocksScan 2s linear infinite;
}
.loading-block {
    width: 16px;
    height: 16px;
    background: #3a8aff;
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 0 3px rgba(58, 138, 255, 0.5);
}
.loading-block:nth-child(2) {
    left: 20px;
}
.loading-block:nth-child(3) {
    left: 40px;
}
@keyframes blocksScan {
    0% {
        transform: translateX(-60px);
    }
    100% {
        transform: translateX(220px);
    }
}
#loadingPortfolioText {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 10;
}
#portfolioMain {
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: bold;
    color: #3a8aff;
    text-shadow:
        1px 1px 0 #2a5aaa,
        2px 2px 0 #1a3a7a,
        0 0 10px rgba(58, 138, 255, 0.3);
    letter-spacing: 8px;
    opacity: 0.7;
    image-rendering: pixelated;
    margin-bottom: 4px;
}
#portfolioSub {
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
    font-size: 11px;
    color: #ccc;
    letter-spacing: 0.5px;
    opacity: 0.6;
    padding-left: 2px;
}
#loadingStatus {
    color: #aaa;
    font-size: 12px;
    font-family: 'Tahoma', sans-serif;
    letter-spacing: 0.5px;
}

/* ====== LOGIN SCREEN ====== */
#loginScreen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    background: #1a3a6a;
}
#loginOverlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('bg.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.6;
}
#loginContent {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
}
#loginTitle {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 8px;
    font-family: 'Tahoma', sans-serif;
    letter-spacing: 2px;
}
#loginHint {
    color: #aac;
    font-size: 14px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
#loginUserCard {
    display: inline-block;
    cursor: pointer;
    padding: 20px 40px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
}
#loginUserCard:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    transform: scale(1.02);
}
#loginAvatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px auto;
    border: 3px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
#loginAvatarImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#loginName {
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 4px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}
#loginSubtitle {
    color: #8ab;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    letter-spacing: 0.8px;
}
#loginShutdown {
    margin-top: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #aac;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}
#loginShutdown:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
#loginStatusBar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 6px 12px;
    background: rgba(0,0,0,0.3);
    color: #aac;
    font-size: 12px;
    text-align: left;
    z-index: 2;
}

/* ====== DESKTOP ====== */
#desktop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
}
#wallpaper {
    flex: 1;
    background: url('bg.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
}

/* ====== WELCOME SPLASH ====== */
#welcomeSplash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.8s ease;
}
#welcomeSplashImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====== DESKTOP ICONS ====== */
.desktop-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 70px;
    text-align: center;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 6px;
    z-index: 10;
    transition: background 0.15s;
}
.desktop-icon:hover {
    background: rgba(255,255,255,0.12);
}
.desktop-icon:active {
    background: rgba(255,255,255,0.18);
}
.desktop-icon.selected {
    background: rgba(0,100,200,0.35);
    border: 1px solid rgba(0,100,200,0.5);
}
.icon-img {
    width: 52px;
    height: 52px;
    margin: 0 auto 4px auto;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.icon-label {
    color: #fff;
    font-size: 11px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    word-wrap: break-word;
    line-height: 1.2;
    pointer-events: none;
}

/* ====== WINDOWS ====== */
.window {
    position: absolute;
    min-width: 500px;
    min-height: 350px;
    background: #ece9d8;
    border: 2px solid #0055d4;
    border-radius: 8px 8px 0 0;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
}
.window-titlebar {
    background: linear-gradient(180deg, #0055d4 0%, #0041a3 50%, #0055d4 100%);
    padding: 4px 6px;
    display: flex;
    align-items: center;
    cursor: move;
    flex-shrink: 0;
}
.window-title-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.window-title-text {
    flex: 1;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.3px;
}
.window-title-buttons {
    display: flex;
    gap: 3px;
}
.window-title-btn {
    width: 20px;
    height: 20px;
    background: #ece9d8;
    border: 1px solid #fff;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: #000;
    line-height: 1;
    transition: background 0.1s;
}
.window-title-btn:hover {
    background: #ddd;
}
.window-title-btn.close {
    background: #e06d5c;
    color: #fff;
    border-color: #c7503e;
}
.window-title-btn.close:hover {
    background: #c7503e;
}
.window-body {
    flex: 1;
    padding: 16px;
    overflow: auto;
    background: #fff;
    font-size: 13px;
    color: #333;
}

/* ====== WINDOW: About Me ====== */
.about-content {
    padding: 16px;
    height: 100%;
}
.about-content h2 {
    color: #0055d4;
    margin-bottom: 16px;
    font-size: 22px;
}
.about-layout {
    display: flex;
    gap: 16px;
    height: calc(100% - 44px);
}
.about-left {
    width: 25%;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.about-right {
    width: 75%;
    flex: 1;
    overflow-y: auto;
}
.about-section {
    background: #f0f4fa;
    border: 1px solid #d0d8e8;
    border-radius: 6px;
    padding: 12px;
}
.about-section-title {
    font-size: 14px;
    font-weight: bold;
    color: #0055d4;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #0055d4;
}
.about-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.about-section li {
    font-size: 12px;
    color: #333;
    padding: 4px 0 4px 12px;
    position: relative;
    line-height: 1.4;
}
.about-section li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #0055d4;
    font-weight: bold;
}
.about-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.lang-toggle {
    padding: 3px 10px;
    background: linear-gradient(180deg, #cce5ff 0%, #a8d4ff 100%);
    border: 1px solid #7ab8ff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Tahoma', sans-serif;
    transition: background 0.1s;
    color: #0055a5;
    font-weight: bold;
}
.lang-toggle:hover {
    background: linear-gradient(180deg, #d9edff 0%, #b8daff 100%);
    border-color: #5a9eff;
}
.about-intro-title {
    font-size: 18px;
    font-weight: bold;
    color: #0055d4;
}
.about-bio {
    font-size: 13.5px;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}
.about-bio p {
    margin-bottom: 14px;
}
.person-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    float: left;
    margin: 0 12px 6px 0;
    border: 2px solid #0055d4;
    shape-outside: circle();
}

/* ====== WINDOW: My Resume ====== */
.resume-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 10px;
}
.resume-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}
.resume-toolbar button {
    padding: 6px 16px;
    background: linear-gradient(180deg, #f0f0f0 0%, #d4d0c8 100%);
    border: 1px solid #999;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Tahoma', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.resume-toolbar button:hover {
    background: linear-gradient(180deg, #fff 0%, #e0ddd5 100%);
    border-color: #7a7a7a;
}
.resume-viewer {
    flex: 1;
    width: 100%;
    border: 1px solid #ccc;
    background: #f5f5f5;
    position: relative;
    min-height: 300px;
    overflow: hidden;
}
.resume-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.resume-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px;
    overflow: visible;
    cursor: grab;
}
.resume-images:active {
    cursor: grabbing;
}
.resume-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: block;
    pointer-events: none;
}

/* ====== WINDOW: My Works (YouTube-inspired) ====== */
.works-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #333;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}
.works-container.dark {
    background: #0f0f0f;
    color: #eee;
}
.works-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.works-container.dark .works-header {
    border-bottom-color: #333;
}
.works-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
}
.works-toggle-group {
    display: flex;
    gap: 6px;
}
.theme-toggle {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 16px;
    background: #f5f5f5;
}
.theme-toggle:hover {
    background: #e0e0e0;
}
.works-container.dark .theme-toggle {
    border-color: #555;
    background: #333;
}
.works-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.works-sidebar {
    width: 240px;
    flex-shrink: 0;
    padding: 8px 0;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}
.works-container.dark .works-sidebar {
    border-right-color: #333;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    border-radius: 0 20px 20px 0;
    margin-right: 8px;
    transition: background 0.15s;
}
.works-container.dark .sidebar-item {
    color: #aaa;
}
.sidebar-item:hover {
    background: #f0f0f0;
}
.works-container.dark .sidebar-item:hover {
    background: #272727;
}
.sidebar-item.active {
    background: #e5e5e5;
    font-weight: bold;
    color: #000;
}
.works-container.dark .sidebar-item.active {
    background: #383838;
    color: #fff;
}
.sidebar-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}
.works-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.work-card {
    border-radius: 10px;
    overflow: hidden;
    background: #f8f8f8;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 3px solid transparent;
}
.works-container.dark .work-card {
    background: #1a1a1a;
}
.work-card:hover {
    border-color: #0055d4;
}
.work-card.active-border {
    border-color: #0055d4;
}
.work-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #ddd;
}
.works-container.dark .work-thumb {
    background: #222;
}
.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}
.work-thumb img.faded {
    opacity: 0.3;
}
.work-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}
.work-card:hover .work-play {
    opacity: 1;
}
.work-info {
    padding: 10px 12px;
}
.work-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}
.works-container.dark .work-title {
    color: #eee;
}
.work-desc {
    font-size: 12px;
    color: #888;
}
.works-container.dark .work-desc {
    color: #777;
}

/* ====== WINDOW: Contact Me ====== */
.contact-content {
    padding: 20px 30px;
}
.contact-content h2 {
    color: #0055d4;
    margin-bottom: 20px;
    font-size: 22px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
}
.contact-item .contact-icon {
    font-size: 24px;
    width: 36px;
    text-align: center;
}
.contact-item .contact-value {
    font-weight: bold;
    color: #0055d4;
    word-break: break-all;
}
.contact-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}
.contact-clickable:hover {
    background: #e8f0ff;
    border-color: #0055d4;
    transform: translateX(4px);
}

/* ====== TASKBAR ====== */
#taskbar {
    height: 40px;
    background: linear-gradient(180deg, #2c5a9c 0%, #1a3d7a 50%, #16356a 100%);
    display: flex;
    align-items: center;
    padding: 0 4px;
    flex-shrink: 0;
    z-index: 200;
    position: relative;
    border-top: 1px solid #4a7ac0;
}
#startBtn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 12px 2px 8px;
    background: linear-gradient(180deg, #4a9a3c 0%, #3a8a2c 50%, #2a7a1c 100%);
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    height: 32px;
    margin-left: -2px;
    border: 1px solid #2a6a1c;
    border-left: none;
    transition: filter 0.1s;
}
#startBtn:hover {
    filter: brightness(1.1);
}
#startBtn:active {
    filter: brightness(0.9);
}
#startBtn span {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    font-style: italic;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}
#taskbarItems {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0 8px;
    overflow: hidden;
}
.taskbar-item {
    padding: 3px 12px;
    background: linear-gradient(180deg, #4a7ac0 0%, #3a6ab0 50%, #2a5aa0 100%);
    border: 1px solid #2a5aa0;
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.1s;
}
.taskbar-item:hover {
    background: linear-gradient(180deg, #5a8ad0 0%, #4a7ac0 50%, #3a6ab0 100%);
}
.taskbar-item.active {
    background: linear-gradient(180deg, #3a6ab0 0%, #2a5aa0 50%, #1a4a90 100%);
    border-color: #1a4a90;
}
#taskbarTray {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
    margin-left: 48px;
}
#notifIcon {
    width: 20px;
    height: 20px;
    background: #3a6ab0;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    font-style: italic;
    font-family: 'Times New Roman', serif;
    cursor: pointer;
    margin-right: 2px;
    transition: background 0.15s;
}
#notifIcon:hover {
    background: #4a7ac0;
}
#notifIcon.new {
    animation: notifPulse 1s ease-in-out infinite;
}
@keyframes notifPulse {
    0%, 100% { background: #3a6ab0; }
    50% { background: #ff8c00; }
}
#taskbarClock {
    color: #fff;
    font-size: 11px;
    padding: 0 6px;
    white-space: nowrap;
}

/* ====== START MENU ====== */
#startMenu {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 280px;
    background: #fff;
    border: 2px solid #0055d4;
    border-radius: 8px 8px 0 0;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.4);
    z-index: 300;
}
#startMenuHeader {
    background: linear-gradient(180deg, #0055d4 0%, #0041a3 50%, #003d99 100%);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px 6px 0 0;
}
#startMenuHeader img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.5);
    object-fit: cover;
}
#startMenuHeader span {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}
#startMenuBody {
    padding: 6px 0;
}
.start-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 13px;
    color: #333;
}
.start-menu-item:hover {
    background: #2a5aaa;
    color: #fff;
}
.start-item-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
#startMenuDivider {
    height: 1px;
    background: #ddd;
    margin: 4px 8px;
}

/* ====== WELCOME BALLOON ====== */
#welcomeBalloon {
    position: absolute;
    bottom: 44px;
    right: 30px;
    width: 320px;
    background: #ffffe1;
    border: 2px solid #0055d4;
    border-radius: 6px;
    box-shadow: 3px 3px 12px rgba(0,0,0,0.4);
    z-index: 250;
    display: flex;
    align-items: flex-start;
    padding: 10px 12px;
    gap: 10px;
    cursor: pointer;
    animation: balloonIn 0.3s ease-out;
}
@keyframes balloonIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
#balloonPointer {
    position: absolute;
    bottom: -8px;
    right: 40px;
    width: 14px;
    height: 14px;
    background: #ffffe1;
    border-right: 2px solid #0055d4;
    border-bottom: 2px solid #0055d4;
    transform: rotate(45deg);
    z-index: -1;
}
#balloonContent {
    display: flex;
    gap: 10px;
    flex: 1;
}
#balloonIcon {
    width: 28px;
    height: 28px;
    background: #0055d4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    font-style: italic;
    font-family: 'Times New Roman', serif;
    flex-shrink: 0;
}
#balloonText {
    flex: 1;
}
#balloonTitle {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 4px;
}
#balloonBody {
    font-size: 11px;
    color: #555;
    line-height: 1.5;
}
#balloonClose {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #999;
    cursor: pointer;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: -2px;
}
#balloonClose:hover {
    background: #ddd;
    color: #333;
}

/* ====== WORK DETAIL PANEL ====== */
.work-detail-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}
.detail-window {
    position: relative;
    z-index: 1;
    background: #fff;
    border: 2px solid #0055d4;
    border-radius: 8px 8px 0 0;
    max-width: 750px;
    width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: linear-gradient(180deg, #0055d4 0%, #0041a3 50%, #0055d4 100%);
    border-radius: 6px 6px 0 0;
    flex-shrink: 0;
}
.detail-header-title {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.3px;
}
.detail-header-close {
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e06d5c;
    border-radius: 3px;
}
.detail-header-close:hover {
    background: #c7503e;
}
.detail-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 13px;
    line-height: 1.7;
    color: #333;
}
.detail-section {
    margin-bottom: 16px;
}
.detail-subtitle {
    font-weight: bold;
    color: #0055d4;
    margin-bottom: 8px;
    font-size: 13px;
}
.detail-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.detail-body li {
    padding: 4px 0 4px 16px;
    position: relative;
    font-size: 12.5px;
    color: #444;
    line-height: 1.6;
}
.detail-body li::before {
    content: '•';
    position: absolute;
    left: 2px;
    color: #0055d4;
    font-weight: bold;
}

/* ====== IMAGE LIGHTBOX ====== */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
}
.lightbox-content {
    position: relative;
    z-index: 1;
    background: #fff;
    border: 2px solid #0055d4;
    border-radius: 8px 8px 0 0;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: linear-gradient(180deg, #0055d4 0%, #0041a3 50%, #0055d4 100%);
    border-radius: 6px 6px 0 0;
}
.lightbox-header-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}
.lightbox-title {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}
.lightbox-zoom {
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    width: 24px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3a6ab0;
    border-radius: 3px;
}
.lightbox-zoom:hover {
    background: #2a5aa0;
}
.lightbox-close {
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e06d5c;
    border-radius: 3px;
}
.lightbox-close:hover {
    background: #c7503e;
}
.lightbox-image-wrapper {
    padding: 8px;
    overflow: auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-image {
    max-width: 100%;
    max-height: 91vh;
    object-fit: contain;
    display: block;
}

/* ====== SELECTION RECTANGLE ====== */
#selectionRect {
    position: fixed;
    z-index: 20;
    border: 1px solid #0055d4;
    background: rgba(0, 85, 212, 0.08);
    display: none;
    pointer-events: none;
}

/* ====== WINDOW OVERLAY ====== */
#windowOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
    z-index: 50;
    display: none;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .window {
        min-width: 90vw !important;
        min-height: 60vh !important;
        left: 5vw !important;
        top: 10vh !important;
        width: 90vw !important;
        height: 70vh !important;
    }
    .desktop-icon {
        width: 60px;
    }
    .icon-img {
        width: 44px;
        height: 44px;
    }
    #startMenu {
        width: 240px;
    }
}