* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Tahoma', sans-serif; }
body, html { 
    width: 100%; 
    height: 100%; 
    height: 100dvh; 
    overflow: hidden; 
    background-color: #d8f1ff; 
    touch-action: manipulation; 
}

body::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://img1.picmix.com/output/stamp/normal/1/3/1/1/2621131_adae0.gif') repeat;
    pointer-events: none; 
    z-index: 5; /* Placed behind the login box and windows */
    opacity: 0.25; /* Made it much more transparent */
}

.hidden { display: none !important; }

#login-screen {
    width: 100%; height: 100%;
    background: #d8f1ff; 
    display: flex; justify-content: center; align-items: center;
    color: #4a4a4a; z-index: 1000; position: absolute; top: 0; left: 0;
}
.login-divider {
    position: absolute; top: 50%; left: 0; width: 100%; height: 2px;
    background: linear-gradient(to right, transparent, #ffffff, transparent);
    transform: translateY(-50%); z-index: 1;
}
.login-box {
    display: flex; align-items: center; gap: 15px; z-index: 2;
    background: #ffffff; 
    padding: 20px; border-radius: 10px; border: 2px solid #80ccff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}
#user-avatar { width: 70px; height: 70px; border-radius: 8px; border: 2px solid #80ccff; cursor: pointer; }
.login-info h2 { font-weight: normal; font-size: 24px; margin-bottom: 2px; color: #8b6b88; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
.input-group { display: flex; gap: 5px; }
#password-input { padding: 5px; border: 1px solid #b3e6ff; border-radius: 3px; outline: none; width: 140px; }
#login-btn { padding: 5px 10px; background: #d8b3d8; color: white; border: 1px solid white; border-radius: 3px; font-weight: bold; cursor: pointer; }
#login-error { color: #ff99aa; font-size: 12px; margin-top: 5px; opacity: 0; font-weight: bold; }

#desktop {
    width: 100%; height: 100%;
    position: relative; display: flex; flex-direction: column;
    background-color: #d8f1ff; 
    background-image: 
        radial-gradient(#ffffff 15%, transparent 16%), 
        radial-gradient(#ffffff 15%, transparent 16%);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
}

/* UPDATED: 3-Column Grid for Icons */
.desktop-icons-container { 
    padding: 15px 10px; 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 25px 10px; 
    justify-items: center; 
    align-content: start; 
    height: calc(100% - 35px); 
    z-index: 10;
    margin-top: 25px; /* Adds space for the marquee */
}

.icon { width: 70px; text-align: center; color: #333; text-shadow: 1px 1px 2px white; cursor: pointer; font-weight: bold; }
.icon-img { width: 32px; height: 32px; margin-bottom: 3px; }
.icon span { font-size: 11px; background: transparent; padding: 2px; border-radius: 3px; display: inline-block; line-height: 1.2; }
.icon:active span { background: #b3e6ff; color: #333; }

#taskbar {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 35px;
    background: #8b6b88; 
    border-top: 2px solid #a382a0;
    display: flex; justify-content: space-between; align-items: center; 
    z-index: 9000;
}
#start-btn {
    height: 100%; display: flex; align-items: center; padding: 0 15px 0 10px; color: white; 
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; font-style: italic; font-size: 18px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    background: linear-gradient(to bottom, #ebd6eb 0%, #d8b3d8 50%, #c496c4 100%); 
    cursor: pointer; border-right: 1px solid #a382a0; border-radius: 0 10px 10px 0;
    box-shadow: inset 1px 1px 3px rgba(255,255,255,0.6);
}
#start-logo { height: 20px; margin-right: 5px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.2)); }
#clock {
    color: white; padding: 0 15px; font-size: 12px; height: 100%; display: flex; align-items: center;
    background: #7a5c78; border-left: 1px solid #a382a0; cursor: pointer; box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2);
}

#start-menu {
    position: fixed; 
    bottom: 35px; 
    left: 0; 
    width: 250px; 
    background: white;
    border-top-right-radius: 5px; border: 1px solid #a382a0; display: flex; flex-direction: column; 
    z-index: 9001;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}
.start-header {
    background: linear-gradient(to bottom, #d8b3d8, #c496c4); color: white; padding: 10px;
    display: flex; align-items: center; gap: 10px; font-weight: bold; border-top-right-radius: 4px; text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}
.start-header img { width: 40px; height: 40px; border-radius: 5px; border: 2px solid white; }
.start-body { background: white; padding: 5px; }
.start-links { display: flex; flex-direction: column; }
.start-links a { text-decoration: none; color: #333; padding: 10px; font-size: 13px; display: block; }
.start-links a:active { background: #f0f8ff; color: #333; }

.window {
    position: absolute; top: 10%; left: 5%; width: 90%; max-width: 400px; max-height: 80%; background: #ffffff;
    border: 3px solid #80ccff; border-radius: 8px 8px 0 0; display: flex; flex-direction: column; z-index: 100;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}
.title-bar {
    background: linear-gradient(to bottom, #b3e6ff, #80ccff 10%, #66b3ff 50%, #80ccff); 
    color: white; font-weight: bold; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    padding: 3px 5px 3px 10px; display: flex; justify-content: space-between; align-items: center; font-size: 13px;
    border-radius: 5px 5px 0 0;
}
.drag-handle { cursor: grab; }
.drag-handle:active { cursor: grabbing; }

.close-btn { 
    background: #ff99aa; color: white; border: 1px solid white; border-radius: 3px; 
    padding: 2px 6px; font-weight: bold; box-shadow: inset 1px 1px 2px rgba(255,255,255,0.5); cursor: pointer;
}
.window-content { padding: 10px; overflow-y: auto; flex: 1; min-height: 250px; background: #fafcff; border: 1px solid #b3e6ff; margin: 2px; }
.no-padding { padding: 0; }

.notepad-area {
    width: 100%; height: 100%; border: none; outline: none; resize: none;
    font-family: 'Lucida Console', Courier, monospace; font-size: 14px; padding: 10px;
    background: #ffffff;
}

.center-content { display: flex; justify-content: center; align-items: center; flex-direction: column; background: #fafcff; }
.error-text p { font-family: 'Tahoma', sans-serif; font-size: 13px; color: #333; margin-bottom: 20px; }
.xp-button {
    padding: 5px 20px; border: 1px solid #80ccff; border-radius: 3px;
    background: linear-gradient(to bottom, #ffffff, #e6f7ff 50%, #cceeff 51%, #b3e6ff);
    cursor: pointer; font-family: 'Tahoma', sans-serif; font-size: 12px; color: #333;
}
.text-file { font-family: 'Lucida Console', Courier, monospace; font-size: 13px; color: #333; }

.cute-file { 
    font-family: 'Comic Sans MS', cursive, sans-serif; 
    text-align: center; 
    color: #4a4a4a; 
    background: linear-gradient(135deg, #f0f8ff, #d8f1ff); 
    border: 2px solid #ffffff; 
    padding: 15px;
    box-shadow: inset 0 0 10px rgba(128, 204, 255, 0.3);
}
.cute-file h2 {
    color: #8b6b88; 
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    font-size: 20px;
    border-bottom: 2px dashed #b3e6ff; 
    padding-bottom: 5px;
}
.cute-file p { font-size: 13px; line-height: 1.5; margin-bottom: 15px; color: #555; }
.obsessions-box { background: rgba(255, 255, 255, 0.7); border: 1px solid #80ccff; border-radius: 8px; padding: 10px; text-align: left; }
.obsessions-box h3 { color: #8b6b88; font-size: 14px; text-align: center; margin-bottom: 8px; text-shadow: 1px 1px 1px white; }
.obsessions-box ul { list-style-type: none; padding: 0; font-size: 12px; color: #555; }
.obsessions-box li { margin-bottom: 5px; padding-left: 15px; position: relative; }
.obsessions-box li::before { content: "❄"; color: #80ccff; position: absolute; left: 0; }

/* ========================================= */
/* NEW PROMO & ALERT STYLES                  */
/* ========================================= */

/* Scrolling Marquee */
#news-marquee {
    position: absolute;
    top: 0; left: 0; width: 100%;
    background: #8b6b88; /* Matches your taskbar */
    color: #ffffff;
    font-family: 'Lucida Console', Courier, monospace;
    font-size: 13px;
    padding: 4px 0;
    overflow: hidden;
    white-space: nowrap;
    z-index: 8990; /* Sits below the glitter but above icons */
    border-bottom: 2px solid #a382a0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.marquee-content {
    display: inline-block;
    animation: marqueeScroll 15s linear infinite; /* Adjust '15s' for scroll speed */
}
@keyframes marqueeScroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* System Alert Pop-up Sizing */
#system-alert {
    width: 300px;
    top: 30%; 
    left: 50%; 
    transform: translateX(-50%); /* Centers it perfectly */
    z-index: 9500;
    border-color: #d8b3d8; /* Pastel lavender border */
}
#system-alert .title-bar {
    background: linear-gradient(to bottom, #ebd6eb, #d8b3d8 50%, #c496c4);
}

/* ========================================= */
/* POLAROID WIDGET STYLES                    */
/* ========================================= */

#polaroid-widget {
    position: absolute;
    bottom: 60px; /* Base starting position */
    right: 20px;
    background: white;
    padding: 10px 10px 25px 10px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.2);
    transform: rotate(4deg);
    z-index: 50; /* Above desktop, below windows */
    cursor: grab;
    transition: width 0.3s ease, height 0.3s ease;
}

#polaroid-widget:active {
    cursor: grabbing;
}

/* The two sizes you can toggle between */
.polaroid-small { width: 140px; }
.polaroid-large { width: 260px; transform: rotate(0deg) !important; box-shadow: 5px 5px 15px rgba(0,0,0,0.4); }

#polaroid-widget img {
    width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    pointer-events: none; /* Crucial so dragging the image drags the div */
}

.polaroid-caption {
    font-family: 'Comic Sans MS', cursive;
    font-size: 13px;
    text-align: center;
    margin-top: 8px;
    color: #8b6b88;
}

/* Cute piece of tape */
.cute-tape {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 60px;
    height: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-left: 2px dashed rgba(0,0,0,0.1);
    border-right: 2px dashed rgba(0,0,0,0.1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Resize Button */
#resize-polaroid-btn {
    position: absolute;
    top: 5px; right: 5px;
    background: #ff99cc;
    color: white;
    border: 1px solid white;
    border-radius: 3px;
    width: 24px; height: 24px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
}
