@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

body {
    background-color: #008080;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    height: 100vh;
    user-select: none;
    direction: rtl;
    /* Hebrew support */
}

/* --- Windows 98 Design System --- */
.win-border {
    background-color: #c0c0c0;
    border-top: 2px solid #dfdfdf;
    border-left: 2px solid #dfdfdf;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    box-shadow: 1px 1px 0 #000;
}

.inset-border {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    background: #fff;
}

.outset-border {
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    background: #c0c0c0;
}

/* --- Desktop Icons --- */
.desktop-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    /* RTL: Icons on the right */
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
    color: white;
    font-size: 12px;
    z-index: 1;
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 80px;
    text-shadow: 1px 1px 0 #000;
}

.icon-img {
    font-size: 32px;
    margin-bottom: 5px;
}

.icon span {
    padding: 2px 4px;
    background: transparent;
}

.icon.selected span {
    background-color: #000080;
    color: white;
    border: 1px dotted #ffff00;
}

.icon.selected .icon-img {
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.5));
    opacity: 0.8;
}

/* --- Windows --- */
.window {
    width: 600px;
    max-width: 90%;
    padding: 3px;
    position: absolute;
    top: 50px;
    left: 100px;
    /* Initial position */
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.title-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
    padding: 3px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: default;
    height: 18px;
}

.title-bar-text {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.controls {
    display: flex;
    gap: 2px;
}

.control-btn {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    font-size: 10px;
    line-height: 10px;
    text-align: center;
    color: black;
    cursor: pointer;
    font-family: sans-serif;
    font-weight: bold;
}

.control-btn:active {
    border-top: 1px solid #000;
    border-left: 1px solid #000;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
}

.menu-bar span:hover {
    background-color: #000080;
    color: white;
}

.window-body {
    padding: 10px;
    color: #000;
    overflow: auto;
    max-height: 70vh;
    font-size: 14px;
}

/* --- Specific Window Content Styles --- */
h1.brand-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 36px;
    color: #000080;
    margin: 10px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2.subtitle {
    font-size: 14px;
    color: #555;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 20px;
    font-weight: normal;
}

.main-grid {
    display: flex;
    gap: 20px;
    align-items: start;
}

.alert-box {
    background-color: #ffffe1;
    border: 1px solid #000;
    padding: 10px;
    margin-top: 15px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
    font-size: 13px;
}

.btn-win98 {
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    color: black;
    font-family: 'Segoe UI', sans-serif;
}

.btn-win98:active {
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(1px, 1px);
}

/* Inventory Grid */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.product-card {
    border: 1px solid #808080;
    padding: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.product-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border: 1px solid #000;
    margin-bottom: 5px;
}

/* --- Taskbar --- */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 28px;
    background: #c0c0c0;
    border-top: 2px solid #fff;
    display: flex;
    align-items: center;
    padding: 2px;
    z-index: 1000;
    direction: ltr;
    /* Keep taskbar LTR for layout control, but items inside can be RTL */
}

.start-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 6px;
    font-weight: bold;
    font-style: italic;
    cursor: pointer;
    margin-left: auto;
    /* Push to right for Hebrew layout */
    margin-right: 2px;
    height: 20px;
}

.start-btn.active {
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    padding: 3px 5px 1px 7px;
    background: #dfdfdf;
}

.task-divider {
    width: 2px;
    height: 20px;
    background: #808080;
    border-right: 1px solid #fff;
    margin: 0 5px;
}

.tasks-area {
    display: flex;
    gap: 5px;
    flex: 1;
    justify-content: flex-end;
    /* Align tasks to right */
    padding-right: 5px;
}

.task-item {
    padding: 2px 10px;
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    font-size: 11px;
    font-weight: bold;
    width: 120px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
}

.task-item.active {
    background: #e0e0e0;
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}

.clock {
    padding: 3px 10px;
    background: #c0c0c0;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    font-size: 11px;
    margin-left: 2px;
    width: 60px;
    text-align: center;
}

/* --- Start Menu --- */
.start-menu {
    position: fixed;
    bottom: 30px;
    right: 2px;
    /* Right aligned */
    width: 200px;
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    display: none;
    /* Hidden by default */
    z-index: 2000;
}

.start-menu.visible {
    display: flex;
}

.start-side {
    width: 25px;
    background: #000080;
    color: white;
    writing-mode: vertical-rl;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    padding: 5px 0;
    letter-spacing: 2px;
    transform: rotate(180deg);
    /* Fix rotation direction */
}

.start-items {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.start-item {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #000;
}


/* --- Scrollbar (Windows 98 Style) --- */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: #dfdfdf;
    /* Optional: Checkerboard pattern for track */
    background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
        linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
    background-size: 2px 2px;
    background-position: 0 0, 1px 1px;
}

::-webkit-scrollbar-thumb {
    background-color: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    box-shadow: inset 1px 1px 0 #dfdfdf;
}

::-webkit-scrollbar-button {
    background-color: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    width: 16px;
    height: 16px;
    display: block;
}

/* Arrows for scrollbar buttons (simplified) */
::-webkit-scrollbar-button:vertical:decrement {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 4L4 12h8z' fill='black'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

::-webkit-scrollbar-button:vertical:increment {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12L4 4h8z' fill='black'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* --- Group Box Style (Like in the image) --- */


.start-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 6px;
    font-weight: bold;
    font-style: italic;
    cursor: pointer;
    margin-left: auto;
    /* Push to right for Hebrew layout */
    margin-right: 2px;
    height: 20px;
}

.start-btn.active {
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    padding: 3px 5px 1px 7px;
    background: #dfdfdf;
}

.task-divider {
    width: 2px;
    height: 20px;
    background: #808080;
    border-right: 1px solid #fff;
    margin: 0 5px;
}

.tasks-area {
    display: flex;
    gap: 5px;
    flex: 1;
    justify-content: flex-end;
    /* Align tasks to right */
    padding-right: 5px;
}

.task-item {
    padding: 2px 10px;
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    font-size: 11px;
    font-weight: bold;
    width: 120px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
}

.task-item.active {
    background: #e0e0e0;
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}

.clock {
    padding: 3px 10px;
    background: #c0c0c0;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    font-size: 11px;
    margin-left: 2px;
    width: 60px;
    text-align: center;
}

/* --- Start Menu --- */
.start-menu {
    position: fixed;
    bottom: 30px;
    right: 2px;
    /* Right aligned */
    width: 200px;
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    display: none;
    /* Hidden by default */
    z-index: 2000;
}

.start-menu.visible {
    display: flex;
}

.start-side {
    width: 25px;
    background: #000080;
    color: white;
    writing-mode: vertical-rl;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    padding: 5px 0;
    letter-spacing: 2px;
    transform: rotate(180deg);
    /* Fix rotation direction */
}

.start-items {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.start-item {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #000;
}


/* --- Scrollbar (Windows 98 Style) --- */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: #dfdfdf;
    /* Optional: Checkerboard pattern for track */
    background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
        linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
    background-size: 2px 2px;
    background-position: 0 0, 1px 1px;
}

::-webkit-scrollbar-thumb {
    background-color: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    box-shadow: inset 1px 1px 0 #dfdfdf;
}

::-webkit-scrollbar-button {
    background-color: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    width: 16px;
    height: 16px;
    display: block;
}

/* Arrows for scrollbar buttons (simplified) */
::-webkit-scrollbar-button:vertical:decrement {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 4L4 12h8z' fill='black'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

::-webkit-scrollbar-button:vertical:increment {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12L4 4h8z' fill='black'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* --- Group Box Style (Like in the image) --- */
.win98-group-box {
    border: 2px solid #808080;
    background: #fff;
    padding: 5px;
    position: relative;
    margin-top: 10px;
}

.win98-group-box-header {
    background: #000080;
    color: white;
    padding: 2px 5px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 5px;
    font-size: 12px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {

    /* Desktop Icons - Scale down and adjust position */
    .desktop-icons {
        top: 10px;
        right: 10px;
        gap: 15px;
    }

    .icon {
        width: 60px;
    }

    .icon-img {
        font-size: 24px;
    }

    .icon span {
        font-size: 10px;
    }

    /* Windows - Full width on mobile */
    .window {
        width: 94% !important;
        left: 3% !important;
        top: 40px !important;
        max-height: 80vh;
    }

    .window-body {
        max-height: 65vh;
    }

    /* Start Menu - Adjust position */
    .start-menu {
        width: 200px;
        right: 2px;
        transform: none;
        bottom: 35px;
    }

    /* Taskbar - Allow scrolling if many items */
    .tasks-area {
        overflow-x: auto;
        justify-content: flex-start;
        /* Align left on mobile for scrolling */
    }

    .task-item {
        min-width: 100px;
        flex-shrink: 0;
    }

    /* Hide clock on very small screens if needed, or adjust */
    .clock {
        display: none;
        /* Save space on small screens */
    }
}

/* --- Checkout Notification --- */
.win98-notification {
    position: fixed;
    bottom: 40px;
    left: 10px;
    /* תצוגה בצד שמאל למטה, לא מסתיר את תפריט ההתחלה */
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    padding: 10px;
    display: none;
    /* Hidden by default */
    align-items: center;
    gap: 10px;
    z-index: 999999;
    /* Ensure it is always on top */
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    border-bottom: 1px solid #fff;
    transform: translate(1px, 1px);
}

.notification-close {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    background: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-family: sans-serif;
    color: black;
    box-shadow: none;
    z-index: 10;
}

.notification-close:active {
    border-top: 1px solid #000;
    border-left: 1px solid #000;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
    transform: translate(1px, 1px);
}

.win98-notification:active {
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(1px, 1px);
}

.notification-icon {
    font-size: 24px;
}

.notification-text {
    font-size: 13px;
    line-height: 1.2;
    color: #000;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}