:root {
    --win-teal: #008080;
    --win-gray: #c0c0c0;
    --win-white: #ffffff;
    --win-black: #000000;
    --win-dark-gray: #808080;
    --win-light: #dfdfdf;
    --win-blue: #000080;
    --taskbar-height: 28px;
}

body {
    background-color: var(--win-teal);
    color: var(--win-black);
    font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif;
    overflow: hidden; 
    margin: 0;
    padding: 0;
    user-select: none;
    height: 100vh;
    height: 100dvh; 
    display: flex;
    flex-direction: column;
    touch-action: manipulation;
}

.win98-window {
    background-color: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-white) var(--win-black) var(--win-black) var(--win-white);
    box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray);
    display: flex;
    flex-direction: column;
    box-sizing: border-box; 
    margin: 0;
    min-height: 0; 
}

.win98-titlebar {
    background-color: var(--win-blue); 
    color: var(--win-light);
    padding: 3px 5px;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-area .win98-titlebar, .shop-area .win98-titlebar, .welcome-window .win98-titlebar {
    color: var(--win-white);
}

.win98-content {
    padding: 15px;
    flex-grow: 1;
    overflow-y: auto;
}

.win98-button {
    background-color: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-white) var(--win-black) var(--win-black) var(--win-white);
    box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray);
    color: var(--win-black);
    font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif;
    cursor: pointer;
    text-align: center;
    padding: 4px;
    box-sizing: border-box;
}

.win98-button:active:not(:disabled) {
    border-color: var(--win-black) var(--win-white) var(--win-white) var(--win-black);
    box-shadow: inset 1px 1px var(--win-dark-gray), inset -1px -1px var(--win-light);
    padding: 5px 3px 3px 5px; 
}

.win98-button:disabled {
    color: var(--win-dark-gray);
    text-shadow: 1px 1px var(--win-white);
    cursor: not-allowed;
}

.win98-input {
    width: 45px;
    padding: 2px 4px;
    font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif;
    font-size: 11px;
    background-color: var(--win-white);
    color: var(--win-black);
    border: 2px solid;
    border-color: var(--win-dark-gray) var(--win-white) var(--win-white) var(--win-black);
    box-shadow: inset 1px 1px var(--win-black), inset -1px -1px var(--win-light);
    outline: none;
}

.close-btn {
    font-weight: bold;
    padding: 0;
    margin-left: 10px;
    font-size: 14px;
    height: 16px; 
    width: 16px;
    line-height: 14px; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.achievement-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-white) var(--win-black) var(--win-black) var(--win-white);
    box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray);
}

.achievement-locked {
    filter: grayscale(100%);
    opacity: 0.5;
}

.achievement-icon {
    width: 40px;
    height: 40px;
    min-width: 40px; 
    flex-shrink: 0;  
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--win-dark-gray);
    border: 2px inset var(--win-white);
}

.achievement-icon img {
    max-width: 40px; 
    max-height: 40px;
    image-rendering: pixelated;
}
.achievement-text {
    flex-grow: 1;
    text-align: left;
}
.achievement-text strong {
    display: block;
    font-size: 14px;
    color: var(--win-blue);
    margin-bottom: 2px;
}
.achievement-text span {
    font-size: 11px;
}

#toast-container {
    position: fixed;
    bottom: 40px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast-notification {
    background-color: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-white) var(--win-black) var(--win-black) var(--win-white);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 250px;
    animation: slideInUp 0.4s ease-out forwards;
    pointer-events: auto;
}
.toast-notification.fade-out {
    animation: fadeOutRight 0.5s ease-in forwards;
}

@keyframes slideInUp {
    from { transform: translateY(150%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(150%); opacity: 0; }
}

::-webkit-scrollbar { width: 16px; height: 16px; background: var(--win-light); }
::-webkit-scrollbar-track { background-color: var(--win-light); }
::-webkit-scrollbar-corner { background-color: var(--win-gray); }
::-webkit-scrollbar-thumb { background-color: var(--win-gray); border-top: 2px solid var(--win-white); border-left: 2px solid var(--win-white); border-bottom: 2px solid var(--win-black); border-right: 2px solid var(--win-black); box-shadow: inset -1px -1px var(--win-dark-gray), inset 1px 1px var(--win-light); }
::-webkit-scrollbar-button { background-color: var(--win-gray); border-top: 2px solid var(--win-white); border-left: 2px solid var(--win-white); border-bottom: 2px solid var(--win-black); border-right: 2px solid var(--win-black); box-shadow: inset -1px -1px var(--win-dark-gray), inset 1px 1px var(--win-light); display: block; background-position: center; background-repeat: no-repeat; }
::-webkit-scrollbar-button:active { border-top: 2px solid var(--win-black); border-left: 2px solid var(--win-black); border-bottom: 2px solid var(--win-white); border-right: 2px solid var(--win-white); box-shadow: inset 1px 1px var(--win-dark-gray), inset -1px -1px var(--win-light); background-position: calc(50% + 1px) calc(50% + 1px); }
::-webkit-scrollbar-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 10l4-5 4 5z' fill='black'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 5 4-5z' fill='black'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:horizontal:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M10 4l-5 4 5 4z' fill='black'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:horizontal:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M6 4l5 4-5 4z' fill='black'/%3E%3C/svg%3E"); }

input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: var(--win-dark-gray); border-bottom: 1px solid var(--win-white); border-right: 1px solid var(--win-white); border-top: 1px solid var(--win-black); border-left: 1px solid var(--win-black); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 12px; background-color: var(--win-gray); border: 2px solid; border-color: var(--win-white) var(--win-black) var(--win-black) var(--win-white); box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray); cursor: pointer; margin-top: -10px; }
input[type=range]::-moz-range-track { width: 100%; height: 4px; cursor: pointer; background: var(--win-dark-gray); border-bottom: 1px solid var(--win-white); border-right: 1px solid var(--win-white); border-top: 1px solid var(--win-black); border-left: 1px solid var(--win-black); }
input[type=range]::-moz-range-thumb { height: 20px; width: 12px; background-color: var(--win-gray); border: 2px solid; border-color: var(--win-white) var(--win-black) var(--win-black) var(--win-white); box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray); cursor: pointer; border-radius: 0; }

#main-content-wrapper { flex: 1; display: flex; align-items: stretch; gap: 20px; padding: 20px; height: auto; box-sizing: border-box; z-index: 1; min-height: 0; }
.game-area { flex: 2; position: relative; box-sizing: border-box; } 
#game-content-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.shop-area { flex: 1; min-width: 300px; }

.score-container { font-size: 18px; margin: 10px 0; padding: 5px; background: var(--win-white); border: 2px solid; border-color: var(--win-dark-gray) var(--win-light) var(--win-light) var(--win-dark-gray); box-shadow: inset 1px 1px var(--win-black); display: inline-block; width: 80%; }
.stats-text { font-size: 12px; margin-bottom: 20px; }

#gug-can { image-rendering: pixelated; width: clamp(150px, min(40vh, 40vw), 250px) !important; height: auto !important; object-fit: contain; cursor: pointer; transition: transform 0.05s; -webkit-user-drag: none; user-select: none; }
#gug-can:active { transform: scale(0.95); }

.upgrade-btn { width: 100%; margin-bottom: 10px; text-align: left; padding: 8px; }
.upgrade-name { font-weight: bold; font-size: 14px; }
.upgrade-desc { font-size: 11px; margin-top: 4px; }
.consumable-btn .upgrade-name { color: #d00000; }
.limit-btn .upgrade-name { color: #000080; }

.popup-ad { position: absolute; width: 300px; z-index: 100; animation: popIn 0.1s ease-out; box-shadow: 2px 2px 5px rgba(0,0,0,0.5); }
.popup-ad .win98-titlebar { cursor: move; }
.popup-content img { max-width: 100%; height: auto; margin-bottom: 10px; border: 1px solid var(--win-dark-gray); -webkit-user-drag: none;}
.popup-content a { color: blue; text-decoration: underline; cursor: pointer; }

.screen-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.7); z-index: 9999; justify-content: center; align-items: center; }
.game-over-window { width: 400px; box-shadow: 5px 5px 15px rgba(0,0,0,0.8); }
.game-over-content { text-align: center; padding: 20px; }
.game-over-content h2 { margin-top: 0; color: var(--win-blue); }
.stats-block { text-align: left; background: var(--win-white); border: 2px solid; border-color: var(--win-dark-gray) var(--win-light) var(--win-light) var(--win-dark-gray); box-shadow: inset 1px 1px var(--win-black); padding: 10px; margin-bottom: 20px; }

.welcome-window { width: 450px; animation: popIn 0.3s ease-out; box-shadow: 5px 5px 15px rgba(0,0,0,0.8); }
.welcome-content { text-align: center; font-size: 12px; padding: 20px; }
.welcome-content h1 { font-size: 18px; margin-top: 0; color: var(--win-blue); }
.setup-icon { margin-bottom: 15px; width: 48px; height: 48px; }
.divider { height: 2px; border-top: 1px solid var(--win-dark-gray); border-bottom: 1px solid var(--win-white); margin: 15px 0; }

.guggy-container { position: absolute; bottom: 20px; left: 20px; z-index: 10; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.guggy-bubble { position: absolute; bottom: 100%; left: 10px; width: 210px; background-color: #ffffe1; border: 1px solid #000000; padding: clamp(6px, 1.5vh, 10px); font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif; font-size: clamp(11px, 2.5vh, 14px); color: #000000; box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3); border-radius: 3px; line-height: 1.3; z-index: 9999; margin-bottom: 10px; }
.guggy-icon-group { display: flex; flex-direction: column; align-items: center; cursor: pointer; pointer-events: auto; padding: 2px; position: relative; z-index: 1; }
#guggy-img { width: clamp(75px, min(16vh, 25vw), 130px) !important; height: auto !important; filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.4)); transition: transform 0.05s ease; image-rendering: pixelated; user-select: none; -webkit-user-drag: none; }
.guggy-icon-group:active #guggy-img { transform: translateY(2px); }
.guggy-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 12px; margin-bottom: 4px; }
.guggy-btn { background-color: #ffffe1; border: 1px solid #000000; border-radius: 4px; padding: 3px 20px; font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif; font-size: 11px; color: #000000; cursor: pointer; box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2); pointer-events: auto; }
.guggy-btn:active { box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3); transform: translateY(1px); }
.guggy-bubble-tail { position: absolute; bottom: -7px; left: 35px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid #ffffe1; }
.win98-desktop-label { margin-top: 5px; font-size: clamp(12px, 2.5vh, 16px); color: var(--win-white); text-align: center; font-weight: bold; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; padding: 1px 3px; border: 1px dotted transparent; user-select: none; position: relative; z-index: 2; }

#trashcan { position: absolute; bottom: 20px; right: 20px; width: auto; height: auto; z-index: 10; display: flex; flex-direction: column; align-items: center; -webkit-user-drag: none; user-select: none; }
#trashcan img { width: clamp(70px, min(30vh, 50vw), 160px) !important; height: auto !important; image-rendering: pixelated; -webkit-user-drag: none; user-select: none; }
.trashcan-label { margin-top: 5px; font-size: clamp(12px, 2.5vh, 16px); color: var(--win-white); text-align: center; font-weight: bold; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; position: relative; z-index: 2; }

#win95-taskbar { height: var(--taskbar-height); background-color: var(--win-gray); border-top: 2px solid var(--win-white); box-shadow: inset 0 1px var(--win-light); display: flex; align-items: center; padding: 2px; box-sizing: border-box; z-index: 10000; position: relative; }
#start-button { display: flex; align-items: center; gap: 4px; font-weight: bold; font-size: 13px; padding: 1px 6px 1px 4px; }
.taskbar-divider { width: 2px; height: 18px; border-left: 1px solid var(--win-dark-gray); border-right: 1px solid var(--win-white); margin: 0 4px; }
#system-tray { margin-left: auto; height: 20px; border: 2px inset; border-color: var(--win-dark-gray) var(--win-white) var(--win-white) var(--win-dark-gray); display: flex; align-items: center; padding: 0 6px; gap: 6px; font-size: 11px; }
#tray-clock { min-width: 50px; text-align: right; }

.glow-unforeseen { background-color: #ffcc80 !important; animation: pulse-orange 2s infinite alternate; color: #660000; }
.glow-post-1 { background-color: #b3ffff !important; animation: pulse-cyan 2s infinite alternate; }
.glow-post-2 { background-color: #b3ffb3 !important; animation: pulse-green 1.2s infinite alternate; }
.glow-post-3 { background-color: #d9b3ff !important; animation: pulse-purple 0.8s infinite alternate; color: #2b0057; }
.glow-post-4 { background-color: #ffe680 !important; animation: pulse-gold 0.3s infinite alternate; font-weight: bold; }

@keyframes pulse-orange { from { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), 0 0 4px #ff6600; } to { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), 0 0 14px #ff6600; } }
@keyframes pulse-cyan { from { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), 0 0 4px #00ffff; } to { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), 0 0 12px #00ffff; } }
@keyframes pulse-green { from { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), 0 0 8px #39ff14; } to { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), 0 0 20px #39ff14; } }
@keyframes pulse-purple { from { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), 0 0 12px #9d00ff; } to { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), 0 0 25px #9d00ff; } }
@keyframes pulse-gold { from { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), inset 0 0 5px #ffd700, 0 0 15px #ffd700; border-color: #aa8c00; } to { box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray), inset 0 0 15px #ffd700, 0 0 35px #ffd700; border-color: #ffe600; } }

.win98-tabs { display: flex; justify-content: center; padding: 6px 4px 0 4px; background-color: var(--win-gray); gap: 2px; border-left: 2px solid var(--win-white); border-right: 2px solid var(--win-black); }
.win98-tab { background-color: var(--win-gray); border-top: 2px solid var(--win-white); border-left: 2px solid var(--win-white); border-right: 2px solid var(--win-black); border-bottom: none; border-top-left-radius: 3px; border-top-right-radius: 3px; padding: 4px 16px; font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif; font-size: 11px; cursor: pointer; color: var(--win-black); margin-top: 3px; z-index: 1; box-shadow: inset -1px 0 0 var(--win-dark-gray); }
.win98-tab.active { margin-top: 0; padding-bottom: 6px; margin-bottom: -2px; z-index: 3; font-weight: bold; }
.tab-content { border-top: 2px solid var(--win-white); }

.roulette-container { width: 100%; height: 120px; background: #000; border: inset 3px #fff; position: relative; overflow: hidden !important; margin: 20px auto; box-sizing: border-box; }
.roulette-line { position: absolute; top: 0; left: 50%; width: 2px; height: 100%; background-color: red; z-index: 10; transform: translateX(-50%); box-shadow: 0 0 5px red; }
.roulette-strip { display: flex; height: 100%; width: fit-content; transition: transform 9s cubic-bezier(0.2, 0, 0.1, 1); transform: translateX(0); }
.spinner-item { width: 100px; height: 100px; margin: 10px 5px; background: #444; border: 2px solid #666; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.spinner-item img { max-width: 80px; max-height: 80px; -webkit-user-drag: none; }

#unboxing-screen, #unboxing-screen .win98-content { overflow-x: hidden !important; scrollbar-width: none !important; -ms-overflow-style: none !important; }
#unboxing-screen::-webkit-scrollbar, #unboxing-screen .win98-content::-webkit-scrollbar { display: none !important; }

#inventory-section { margin-top: 20px; padding: 20px; background-color: var(--win-dark-gray); color: var(--win-white); border: 2px solid; border-color: var(--win-dark-gray) var(--win-white) var(--win-white) var(--win-black); box-shadow: inset -1px -1px var(--win-light), inset 1px 1px var(--win-black); display: block; box-sizing: border-box; width: 100%; }
.inventory-top-bar { position: sticky; top: -20px; background-color: var(--win-dark-gray); z-index: 100; padding-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 2px solid; border-color: var(--win-dark-gray) transparent transparent var(--win-white); width: 100%; box-sizing: border-box; }
.inventory-top-bar h2 { margin: 0; font-size: 16px; text-shadow: 1px 1px 0 #000; white-space: nowrap; }

#inventory-info-panel { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; font-size: 12px; font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif; color: var(--win-white); width: 100%; }
#inventory-info-panel span { white-space: nowrap; }

.inventory-item { -webkit-user-drag: none; width: 80px; height: 80px; background-color: var(--win-gray); position: relative; display: flex; justify-content: center; align-items: center; padding: 5px; cursor: pointer; border: 2px solid; border-color: var(--win-white) var(--win-black) var(--win-black) var(--win-white); box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark-gray); }
.inventory-item:active { -webkit-user-drag: none; border-color: var(--win-black) var(--win-white) var(--win-white) var(--win-black); box-shadow: inset 1px 1px var(--win-dark-gray), inset -1px -1px var(--win-light); padding: 6px 4px 4px 6px; }
.inventory-item img { -webkit-user-drag: none; max-width: 100%; max-height: 100%; object-fit: contain; }
.item-quantity { position: absolute; bottom: 2px; right: 2px; background-color: var(--win-white); color: var(--win-black); font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif; font-size: 11px; font-weight: bold; padding: 1px 4px; border: 1px solid var(--win-black); box-shadow: 1px 1px 0 var(--win-dark-gray); }

#open-shop-btn { display: none; font-weight: bold; padding: 10px 20px; font-size: 16px; margin-bottom: 20px; color: #000000; width: 80%; max-width: 300px; }
.shop-close-btn { display: flex; }
#shop-overlay-wrapper { flex: 1; min-width: 300px; display: flex; flex-direction: column; min-height: 0; }
#shop-overlay-wrapper .shop-area { flex: 1; min-height: 0; max-width: none; height: auto; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-blue { color: var(--win-blue); }
.text-danger { color: maroon; }
.text-bold { font-weight: bold; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-wrap-center { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.full-width { width: 100%; }
.mt-0 { margin-top: 0; }
.mt-15 { margin-top: 15px; }
.pad-btn { padding: 10px 20px; }
.begin-btn { padding: 5px 15px; font-weight: bold; }
.btn-danger { color: maroon; padding: 6px; }

.task-btn { width: 120px; text-align: left; font-size: 11px; gap: 3px; display: flex; align-items: center; font-weight: bold; }
.settings-btn, .credits-btn { width: 90px; margin-left: 4px; }
.credits-window { width: 400px; box-shadow: 2px 2px 0px rgba(0,0,0,0.5); }
.credits-content { padding: 15px; background: white; font-family: 'Courier New', Courier, monospace; font-size: 14px; line-height: 1.8; border: inset 2px; }
.unboxing-window { width: 600px; max-width: 90%; }
.unboxing-content { text-align: center; background: #c0c0c0; padding: 20px; }
.rarity-boosts { text-align: center; font-size: 12px; margin-top: 5px; margin-bottom: 15px; font-family: Tahoma, 'MS Sans Serif', sans-serif; text-shadow: 1px 1px 0px #000; }
.crate-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 4000; justify-content: center; align-items: center; }
#gug-crate-gif { max-width: 80%; max-height: 80%; image-rendering: pixelated; }
#info-title-text { text-shadow: 1px 1px 0 #000; }
#info-date-text { color: var(--win-light); }
#inventory-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; width: 100%; box-sizing: border-box; }

.crate-btn-custom { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 140px; height: 170px; padding: 10px; box-sizing: border-box; }
.crate-btn-custom img { width: 80px; height: auto; margin-bottom: 8px; -webkit-user-drag: none; }
.crate-price { font-weight: bold; margin-top: auto; text-align: center; font-size: 12px; }

/* mobile patch */ 
@media screen and (max-width: 800px) {
    #main-content-wrapper { flex-direction: column; overflow: hidden; align-items: center; justify-content: center; flex: 1; height: auto; padding: 10px; box-sizing: border-box; z-index: auto; }
    .game-area, .shop-area { flex: 1; width: 100%; height: 100%; margin-bottom: 0; overflow: hidden; }
    #game-content-inner { justify-content: flex-start; overflow: hidden; }
    #game-content-inner > div:last-of-type { margin-top: auto; margin-bottom: auto; }
    #gug-can { margin-bottom: 200px; }
    #open-shop-btn { display: inline-block; }
    .shop-close-btn { display: flex; }
    #shop-overlay-wrapper { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 1500; align-items: center; justify-content: center; }
    #shop-overlay-wrapper.mobile-open { display: flex !important; }
    #shop-overlay-wrapper .shop-area { width: 95vw; height: 85vh; max-width: 500px; box-shadow: 5px 5px 15px rgba(0,0,0,0.8); flex: none; }
    .popup-ad { width: 200px !important; font-size: 10px; }
    .popup-ad .win98-titlebar { font-size: 11px; padding: 2px 4px; }
    .popup-content { padding: 6px; }
    .popup-content iframe { height: 110px !important; }

    #win95-taskbar {
        gap: 2px;
    }
    
    .task-btn {
        flex: 1; 
        width: auto !important; 
        min-width: 25px; 
        padding: 2px !important;
        margin-left: 0 !important; 
        font-size: 10px;
        
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis; 
    }

    #start-button, #system-tray {
        flex-shrink: 0; 
    }
}

@keyframes smoothZoomFade { 0% { opacity: 0; transform: scale(0.7); } 100% { opacity: 1; transform: scale(1); } }
@keyframes simpleFade { 0% { opacity: 0; } 100% { opacity: 1; } }
.fade-in-only { animation: simpleFade 0.35s ease-out forwards; }
.zoom-fade-in { animation: smoothZoomFade 0.35s cubic-bezier(0.2, 0, 0.1, 1) forwards; }