* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 11px;
    background: url('assets/bliss.jpg') center/cover fixed no-repeat;
    background-color: #0099ff;
    overflow: hidden;
    user-select: none;
}

/* Desktop */
#desktop {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Icons */
.desktop-icon {
    position: absolute;
    width: 80px;
    text-align: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 2px;
    user-select: none;
}

.desktop-icon:hover {
    background: rgba(0, 0, 0, 0.1);
}

.desktop-icon.selected {
    background: rgba(0, 0, 120, 0.3);
    border: 1px dotted white;
}

.icon-image {
    width: 48px;
    height: 48px;
    margin: 0 auto 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-image img {
    max-width: 100%;
    max-height: 100%;
}

.icon-label {
    color: white;
    font-size: 11px;
    word-wrap: break-word;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    white-space: normal;
    max-height: 60px;
    overflow: hidden;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: linear-gradient(to bottom, #c0c0c0, #808080);
    border-top: 2px solid #dfdfdf;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    border-left: 2px solid #dfdfdf;
    display: flex;
    align-items: center;
    padding: 3px;
    gap: 4px;
    z-index: 100;
}

/* ОСЬ ЦЕЙ НОВИЙ БЛОК ДЛЯ КНОПКИ */
.start-button {
    background: transparent;
    border: 2px outset #dfdfdf;
    border-right-color: #808080;
    border-bottom-color: #808080;
    padding: 2px 8px;
    height: 28px; /* Збільшена висота під новий таскбар */
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.start-button .start-logo {
    height: 18px;          /* підганяє логотип під висоту кнопки */
    width: auto;           /* зберігає пропорції ширини */
    object-fit: contain;   /* гарантує, що картинка не стискається і не обрізається */
    pointer-events: none;
}

.start-button:active {
    border-style: inset;
    border-color: #808080 #dfdfdf #dfdfdf #808080;
}

.start-button img {
    width: 16px;
    height: 16px;
}

.taskbar-separator {
    width: 2px;
    height: 20px;
    background: linear-gradient(to right, #dfdfdf, #808080);
    margin: 0 2px;
}

.taskbar-buttons {
    display: flex;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
}

.taskbar-btn {
    background: linear-gradient(to bottom, #c0c0c0, #808080);
    border: 2px outset #dfdfdf;
    border-right-color: #808080;
    border-bottom-color: #808080;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    
    /* ФІКСОВАНИЙ ТА ОДНАКОВИЙ РОЗМІР КНОПОК */
    flex: 0 0 140px; /* Кнопки мають однакову ширину 140px */
    height: 28px;     /* Збільшена висота кнопок */
    
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.taskbar-btn:active,
.taskbar-btn.active {
    border-style: inset;
    border-color: #808080 #dfdfdf #dfdfdf #808080;
}

.taskbar-btn img {
    width: 16px;
    height: 16px;
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 36px; /* Збігається з новою висотою таскбару */
    left: 2px;
    background: linear-gradient(to right, #c0c0c0, #a0a0a0);
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    width: 200px;
    z-index: 1000;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.start-menu-item {
    padding: 2px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.start-menu-item:hover {
    background: #000080;
    color: white;
}

.start-menu-item.separator {
    height: 2px;
    background: linear-gradient(to right, #dfdfdf, #808080);
    margin: 2px 0;
    cursor: default;
}

.start-menu-item.separator:hover {
    background: linear-gradient(to right, #dfdfdf, #808080);
    color: inherit;
}

.start-menu-item img {
    width: 16px;
    height: 16px;
}

.submenu {
    position: absolute;
    left: 100%;
    bottom: 0;
    background: linear-gradient(to right, #c0c0c0, #a0a0a0);
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    min-width: 180px;
    margin-left: 0;
    display: none;
}

.start-menu-item:hover .submenu {
    display: block;
}

.submenu-item {
    padding: 2px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.submenu-item:hover {
    background: #000080;
    color: white;
}

/* Windows */
.window {
    position: fixed;
    background: linear-gradient(to right, #c0c0c0, #a0a0a0);
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    box-shadow: 1px 1px 0 #ffffff inset, -1px -1px 0 #808080 inset;
    min-width: 300px;
    min-height: 200px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    user-select: none;
}

.window-title {
    background: linear-gradient(to right, #000080, #1084d7);
    color: white;
    padding: 2px 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    font-size: 11px;
    font-weight: bold;
    user-select: none;
    flex-shrink: 0;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.window-btn {
    background: linear-gradient(to bottom, #c0c0c0, #808080);
    border: 2px outset #dfdfdf;
    border-right-color: #808080;
    border-bottom-color: #808080;
    width: 16px;
    height: 14px;
    cursor: pointer;
    font-size: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
}

.window-btn:active {
    border-style: inset;
    border-color: #808080 #dfdfdf #dfdfdf #808080;
}

.window-content {
    flex: 1;
    background: #c0c0c0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.window-iframe {
    flex: 1;
    border: none;
    width: 100%;
    height: 100%;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    flex-direction: column;
    gap: 10px;
}

.loading-bar {
    width: 200px;
    height: 16px;
    background: linear-gradient(to bottom, #c0c0c0, #808080);
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(to right, #000080, #1084d7);
    width: 0%;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 100%; }
}

.loading-text {
    color: white;
    font-size: 11px;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Recycle Bin */
.recycle-bin {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 80px;
    text-align: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 2px;
}

.recycle-bin:hover {
    background: rgba(0, 0, 0, 0.1);
}

.bin-image {
    width: 48px;
    height: 48px;
    margin: 0 auto 5px;
}

.bin-image img {
    max-width: 100%;
    max-height: 100%;
}

.bin-label {
    color: white;
    font-size: 11px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Recycled Items Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: linear-gradient(to right, #c0c0c0, #a0a0a0);
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    width: 400px;
    max-height: 500px;
}

.modal-title {
    background: linear-gradient(to right, #000080, #1084d7);
    color: white;
    padding: 2px 4px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.modal-body {
    padding: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.recycled-item {
    padding: 4px;
    margin: 2px 0;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.recycled-item:hover {
    background: #1084d7;
    color: white;
}

.recycled-item-name {
    flex: 1;
}

.restore-btn {
    background: linear-gradient(to bottom, #c0c0c0, #808080);
    border: 2px outset #dfdfdf;
    border-right-color: #808080;
    border-bottom-color: #808080;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 11px;
}

.restore-btn:active {
    border-style: inset;
    border-color: #808080 #dfdfdf #dfdfdf #808080;
}

.modal-buttons {
    padding: 8px;
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    border-top: 2px solid #dfdfdf;
}

.modal-btn {
    background: linear-gradient(to bottom, #c0c0c0, #808080);
    border: 2px outset #dfdfdf;
    border-right-color: #808080;
    border-bottom-color: #808080;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 11px;
    min-width: 60px;
}

.modal-btn:active {
    border-style: inset;
    border-color: #808080 #dfdfdf #dfdfdf #808080;
}
.iframe-dragging {
    pointer-events: none !important;
}
