/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #008080;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
}

/* Desktop */
.desktop {
    width: 100%;
    height: calc(100vh - 40px);
    position: relative;
    padding: 1rem;
}

.desktop-icons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.desktop-icon {
    width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    user-select: none;
}

.desktop-icon:hover {
    background-color: rgba(0, 0, 128, 0.3);
}

.desktop-icon.selected {
    background-color: rgba(0, 0, 128, 0.5);
}

.icon-image {
    width: 96px;
    height: 96px;
    margin-bottom: 0.75rem;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
}

.icon-image-emoji {
    font-size: 5.25rem;
    margin-bottom: 0.75rem;
}

.icon-label {
    color: #ffffff;
    font-size: 1.125rem;
    text-align: center;
    text-shadow: 1px 1px 2px #000000;
    word-wrap: break-word;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 0 3px;
    z-index: 1000;
}

.start-button {
    height: 48px;
    padding: 0 1.125rem;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
}

.start-button:hover {
    background-color: #dfdfdf;
}

.start-button:active,
.start-button.active {
    border-top: 2px solid #000000;
    border-left: 2px solid #000000;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.start-logo {
    font-size: 1.8rem;
}

.taskbar-windows {
    flex: 1;
    display: flex;
    gap: 4px;
    margin-left: 4px;
    overflow-x: auto;
}

.taskbar-window {
    height: 48px;
    padding: 0 1.125rem;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.275rem;
    white-space: nowrap;
    width: 210px;
    min-width: 210px;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.taskbar-window:hover {
    background-color: #dfdfdf;
}

.taskbar-window.active {
    border-top: 2px solid #000000;
    border-left: 2px solid #000000;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.system-tray {
    height: 48px;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    font-size: 1.2rem;
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 60px;
    left: 3px;
    width: 375px;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    display: none;
    z-index: 1001;
}

.start-menu.active {
    display: block;
}

.start-menu-header {
    background: linear-gradient(to right, #000080, #1084d0);
    color: #ffffff;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    writing-mode: horizontal-tb;
}

.start-menu-title {
    font-weight: normal;
}

.start-menu-items {
    padding: 0.375rem 0;
}

.start-menu-item {
    padding: 0.75rem 2.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    font-size: 1.35rem;
}

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

.menu-icon {
    font-size: 1.8rem;
    width: 36px;
}

.start-menu-separator {
    height: 1px;
    background-color: #808080;
    margin: 0.25rem 0.5rem;
    border-bottom: 1px solid #ffffff;
}

/* Window */
.window {
    position: fixed;
    background-color: #c0c0c0;
    border-top: 3px solid #ffffff;
    border-left: 3px solid #ffffff;
    border-right: 3px solid #000000;
    border-bottom: 3px solid #000000;
    min-width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    display: none;
    flex-direction: column;
    z-index: 100;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
}

.window.active {
    display: flex;
    z-index: 200;
}

.window.opening {
    animation: windowOpen 0.3s linear;
}

@keyframes windowOpen {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Echo trail effect */
.echo-trail {
    position: fixed;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    pointer-events: none;
    z-index: 50;
    animation: echoFade 0.3s linear forwards;
}

@keyframes echoFade {
    0% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
    }
}

.window-titlebar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.window-title {
    font-weight: bold;
    font-size: 0.9rem;
}

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

.window-control {
    width: 18px;
    height: 18px;
    background-color: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.window-control:hover {
    background-color: #dfdfdf;
}

.window-control:active {
    border-top: 1px solid #000000;
    border-left: 1px solid #000000;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
}

.window-content {
    padding: 1rem;
    overflow-y: scroll;
    flex: 1;
    background-color: #c0c0c0;
}

/* About window specific styling */
#aboutWindow .window-content {
    max-height: 400px;
}

/* Windows 95 style scrollbar */
.window-content::-webkit-scrollbar {
    width: 16px;
}

.window-content::-webkit-scrollbar-track {
    background-color: #c0c0c0;
    border-left: 1px solid #ffffff;
}

.window-content::-webkit-scrollbar-thumb {
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background-color: #dfdfdf;
}

.window-content::-webkit-scrollbar-button {
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    height: 16px;
}

.window-content::-webkit-scrollbar-button:hover {
    background-color: #dfdfdf;
}

.window-content h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #000000;
}

.window-content h3 {
    font-size: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #000000;
    font-weight: bold;
}

.window-content p {
    margin-bottom: 0.75rem;
    color: #000000;
}

.flavor-list {
    font-size: inherit;
    line-height: inherit;
    color: #000000;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.file-item:hover {
    background-color: #000080;
    color: #ffffff;
}

/* Contact links */
.contact-link {
    color: #0000ff;
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
}

.contact-link:visited {
    color: #800080;
}

.contact-link:hover {
    color: #ff0000;
}

.contact-link:active {
    color: #ff0000;
}

/* Malware windows */
.malware-window {
    min-width: 300px;
    max-width: 400px;
}

.malware-content {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    min-height: 200px;
}

.malware-gif {
    width: 100%;
    height: auto;
    display: block;
}

/* Products container */
.products-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    padding: 1rem;
    background-color: #c0c0c0;
    overflow-x: auto;
}

/* Sold out tooltip */
.soldout-tooltip {
    position: fixed;
    background-color: #ff0000;
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid #000000;
    pointer-events: none;
    z-index: 10000;
    display: none;
    white-space: nowrap;
}

.product-card {
    background-color: #c0c0c0;
    border-radius: 0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    overflow: visible;
    transition: none;
    flex: 0 0 auto;
    width: 300px;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: none;
    box-shadow: none;
}

.product-image {
    height: 200px;
    background: #008080;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: none;
    border-top: 2px solid #000000;
    border-left: 2px solid #000000;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.product-image:hover {
    opacity: 1;
    background: #00a0a0;
}

.placeholder-image {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000000;
}

.product-info {
    padding: 1.5rem;
    background-color: #c0c0c0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #000000;
    text-align: center;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-description {
    color: #000000;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: center;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #000080;
    margin-bottom: 1.5rem;
    text-align: center;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.6rem 0.5rem;
    border-radius: 0;
    font-weight: bold;
    cursor: pointer;
    transition: none;
    font-size: 0.85rem;
    width: 100%;
    height: 40px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    background-color: #c0c0c0;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-primary {
    background-color: #c0c0c0;
    color: #000000;
}

.btn-primary:hover {
    background-color: #dfdfdf;
    transform: none;
}

.btn-primary:active {
    border-top: 2px solid #000000;
    border-left: 2px solid #000000;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.btn-primary.soldout {
    background-color: #808080;
    color: #c0c0c0;
    cursor: not-allowed;
    text-decoration: line-through;
    border-top: 2px solid #000000;
    border-left: 2px solid #000000;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
}

.btn-primary.soldout:hover {
    background-color: #808080;
    transform: none;
}

.btn-secondary {
    background-color: #c0c0c0;
    color: #000000;
}

.btn-secondary:hover {
    background-color: #dfdfdf;
    transform: none;
}

.btn-secondary:active {
    border-top: 2px solid #000000;
    border-left: 2px solid #000000;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
}

.modal-content {
    position: relative;
    background-color: #c0c0c0;
    margin: 5% auto;
    padding: 0;
    border-radius: 0;
    width: fit-content;
    max-width: 90vw;
    animation: none;
    border-top: 3px solid #ffffff;
    border-left: 3px solid #ffffff;
    border-right: 3px solid #000000;
    border-bottom: 3px solid #000000;
    display: flex;
    flex-direction: column;
}

.modal-titlebar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

@keyframes modalSlideIn {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
}

.video-container iframe,
.video-container video {
    display: block;
    width: 100%;
    height: auto;
    border: none;
    max-width: 100%;
}

/* Cart notification */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background-color: #ffff00;
    color: #000000;
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-top: 3px solid #ffffff;
    border-left: 3px solid #ffffff;
    border-right: 3px solid #000000;
    border-bottom: 3px solid #000000;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1001;
    font-weight: bold;
}

.cart-notification.show {
    transform: translateX(0);
}

/* Shutdown overlay */
.shutdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: none;
    z-index: 9999;
    overflow: hidden;
}

.shutdown-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.shutdown-overlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Clippy/Genie character styling - Windows 95 theme */
.clippy, .clippy-balloon {
    z-index: 10001 !important;
}

.clippy-balloon {
    background-color: #ffffe1 !important;
    border: 2px solid #000000 !important;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3) !important;
    border-radius: 0 !important;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', sans-serif !important;
    font-size: 14px !important;
    padding: 8px 10px !important;
}

.clippy-balloon-button {
    background-color: #c0c0c0 !important;
    border-top: 2px solid #ffffff !important;
    border-left: 2px solid #ffffff !important;
    border-right: 2px solid #000000 !important;
    border-bottom: 2px solid #000000 !important;
    border-radius: 0 !important;
    padding: 4px 12px !important;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', sans-serif !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

.clippy-balloon-button:hover {
    background-color: #dfdfdf !important;
}

.clippy-balloon-button:active {
    border-top: 2px solid #000000 !important;
    border-left: 2px solid #000000 !important;
    border-right: 2px solid #ffffff !important;
    border-bottom: 2px solid #ffffff !important;
}

/* Responsive design */
@media (max-width: 1024px) {
    .products-grid {
        gap: 1rem;
    }
    
    .product-card {
        min-width: 250px;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .products-grid {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .product-card {
        min-width: 280px;
        max-width: 350px;
        width: 100%;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: fit-content;
        max-width: 95vw;
    }
    
    .cart-notification {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100px);
    }
    
    .cart-notification.show {
        transform: translateY(0);
    }
}
