/* Reset dan Konfigurasi Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #008080;
    /* Warna biru Teal khas Windows 95 desktop */
    font-family: 'MS Sans Serif', 'Pixelated MS Sans Serif', Tahoma, sans-serif;
    color: #000;
    overflow: hidden;
    /* Mencegah scroll dari desktop */
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Icon Desktop */
.desktop-icons {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex: 1;
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
}

.icon-img {
    font-size: 2.5rem;
    margin-bottom: 5px;
    text-shadow: 1px 1px 0 #000;
    /* Sedikit bayangan hitam supaya kontras dengan hijau teal */
}

.icon-img-tag {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    object-fit: contain;
    /* Efek bayangan buatan menggunakan drop-shadow pada gambar transparan */
    filter: drop-shadow(1px 1px 0px #000);
}

.icon-text {
    color: white;
    padding: 2px 4px;
    font-size: 0.8rem;
    text-align: center;
    user-select: none;
}

.icon:focus-within .icon-text,
.icon:active .icon-text {
    background-color: #000080;
    outline: 1px dotted white;
}

/* Base Window (Jendela) */
.window {
    position: absolute;
    background-color: #c0c0c0;
    /* Efek 3D khas Win95 */
    border-top: 2px solid #dfdfdf;
    border-left: 2px solid #dfdfdf;
    border-right: 2px solid #0a0a0a;
    border-bottom: 2px solid #0a0a0a;
    box-shadow: inset 1px 1px #ffffff, inset -1px -1px #808080;
    width: 320px;
    max-width: 90vw;
    /* Responsif untuk layar kecil */
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.window.hidden {
    display: none;
}

/* Title bar jendela */
.title-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
    padding: 3px 2px 3px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 2px 0 2px;
    cursor: default;
    /* Akan di-override script saat drag */
}

.title-bar-text {
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    cursor: grab;
}

/* Tombol Tutup Jendela (X) */
.close-btn {
    background-color: #c0c0c0;
    border-top: 2px solid #dfdfdf;
    border-left: 2px solid #dfdfdf;
    border-right: 2px solid #0a0a0a;
    border-bottom: 2px solid #0a0a0a;
    box-shadow: inset 1px 1px #ffffff, inset -1px -1px #808080;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 0 4px;
    cursor: pointer;
}

.close-btn:active {
    border-top: 2px solid #0a0a0a;
    border-left: 2px solid #0a0a0a;
    border-right: 2px solid #dfdfdf;
    border-bottom: 2px solid #dfdfdf;
    box-shadow: inset 1px 1px #808080, inset -1px -1px #ffffff;
}

/* Isi jendela */
.window-body {
    padding: 15px;
    font-size: 0.9rem;
    flex: 1;
    margin: 2px;
}

/* Variasi isi jendela */
.text-body {
    background-color: #fff;
    font-family: 'Courier New', Courier, monospace;
    /* Ala Notepad */
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.folder-body {
    background-color: #fff;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    width: 60px;
}

.file-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.file-icon-img {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
    object-fit: contain;
}

.file-item span {
    font-size: 0.75rem;
    text-align: center;
}

.dialog-body {
    background-color: #c0c0c0;
    /* Polos ala Alert dialog biasa */
    text-align: center;
}

/* Tombol Biasa di dalam jendela */
.win-btn {
    background-color: #c0c0c0;
    border-top: 2px solid #dfdfdf;
    border-left: 2px solid #dfdfdf;
    border-right: 2px solid #0a0a0a;
    border-bottom: 2px solid #0a0a0a;
    box-shadow: inset 1px 1px #ffffff, inset -1px -1px #808080;
    padding: 6px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 15px;
    margin-bottom: 5px;
}

.win-btn:active {
    border-top: 2px solid #0a0a0a;
    border-left: 2px solid #0a0a0a;
    border-right: 2px solid #dfdfdf;
    border-bottom: 2px solid #dfdfdf;
    box-shadow: inset 1px 1px #808080, inset -1px -1px #ffffff;
}

/* Start Menu */
#start-menu {
    position: absolute;
    bottom: 35px;
    /* Tepat di atas taskbar */
    left: 0;
    width: 200px;
    background-color: #c0c0c0;
    border-top: 2px solid #dfdfdf;
    border-left: 2px solid #dfdfdf;
    border-right: 2px solid #0a0a0a;
    border-bottom: 2px solid #0a0a0a;
    box-shadow: inset 1px 1px #ffffff, inset -1px -1px #808080;
    display: flex;
    z-index: 999;
}

#start-menu.hidden {
    display: none;
}

.start-menu-sidebar {
    background: linear-gradient(0deg, #000080, #1084d0);
    width: 30px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 5px;
}

.start-menu-sidebar span {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding-top: 10px;
    letter-spacing: 1px;
}

.start-menu-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 0.85em;
}

.menu-item:hover {
    background-color: #000080;
    color: white;
}

.menu-icon {
    font-size: 1.5em;
    margin-right: 10px;
    width: 25px;
    text-align: center;
}

.menu-icon-img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-left: 2px;
    object-fit: contain;
}

.menu-separator {
    border: none;
    border-top: 1px solid #808080;
    border-bottom: 1px solid #ffffff;
    margin: 4px 2px;
}

/* Taskbar Bawah */
.taskbar {
    background-color: #c0c0c0;
    border-top: 2px solid #dfdfdf;
    box-shadow: inset 0px 1px #ffffff;
    padding: 3px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 35px;
    z-index: 100;
}

.start-btn {
    background-color: #c0c0c0;
    border-top: 2px solid #dfdfdf;
    border-left: 2px solid #dfdfdf;
    border-right: 2px solid #0a0a0a;
    border-bottom: 2px solid #0a0a0a;
    box-shadow: inset 1px 1px #ffffff, inset -1px -1px #808080;
    padding: 2px 6px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 100%;
}

.start-btn:active {
    border-top: 2px solid #0a0a0a;
    border-left: 2px solid #0a0a0a;
    border-right: 2px solid #dfdfdf;
    border-bottom: 2px solid #dfdfdf;
    box-shadow: inset 1px 1px #808080, inset -1px -1px #ffffff;
    padding: 3px 5px 1px 7px;
    /* Menambah efek tombol tertekan */
}

.win-logo {
    height: 18px;
    /* Sesuaikan ukuran gambar agar pas di tombol */
    width: auto;
    object-fit: contain;
}

.taskbar-time {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    padding: 2px 10px;
    font-size: 0.8rem;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Responsif Mobile Khusus Retro */
@media (max-width: 600px) {
    .taskbar {
        padding: 2px;
    }

    .start-btn {
        padding: 2px;
        font-size: 0.8rem;
    }

    .desktop-icons {
        gap: 15px;
        /* Jarak icon didekatkan sedikit */
        flex-direction: row;
        /* Ganti ke baris agar bisa wrap kalau nambah banyak, atau hapus dan biarkan default */
        flex-wrap: wrap;
        align-content: flex-start;
    }

    .window {
        /* Untuk layar kecil, pastikan tidak tertutup penuh jika dipindah */
        width: 95vw;
        max-width: 100vw;
    }
}