* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    cursor: url("https://cur.cursors-4u.net/cursors/cur-2/cur117.cur"), auto !important;
}

body {
    background: #7ec0ee;
    background-image:
        linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px),
        linear-gradient(to bottom, #87ceeb 0%, #b8e6ff 40%, #7fd66f 100%);
    background-size: 32px 32px, 32px 32px, cover;
    font-family: Tahoma, Verdana, sans-serif;
    overflow: hidden;
    color: black;
    height: 100vh;
    width: 100vw;
}

.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: url('https://www.transparenttextures.com/patterns/asfalt-light.png');
    mix-blend-mode: overlay;
    z-index: 9999;
}

.desktop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(100vh - 42px); /* Leave space for taskbar */
    overflow: hidden;
}

.desktop-icon {
    position: absolute;
    width: 90px;
    text-align: center;
    color: white;
    font-size: 11px;
    text-shadow: 1px 1px 0px black;
}
.desktop-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.desktop-icon.selected {
    background-color: rgba(0, 0, 128, 0.5);
    border: 1px dotted rgba(255,255,255,0.7);
}

.desktop-icon img {
    width: 48px;
    margin-bottom: 4px;
    filter: saturate(1.2);
}

.window {
    position: absolute;
    background: #c0c0c0;
    border: 3px solid;
    border-color: #ffffff #5f5f5f #5f5f5f #ffffff;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}
.window.focused {
    z-index: 1000 !important;
}

.title-bar {
    background: linear-gradient(to right, #0a246a, #3a6ea5);
    color: white;
    padding: 4px 6px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    user-select: none;
}
.window:not(.focused) .title-bar {
    background: linear-gradient(to right, #7a96df, #9ebcf2);
}

.title-buttons {
    display: flex;
    gap: 4px;
}

.title-buttons div {
    width: 16px;
    height: 16px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #5f5f5f #5f5f5f #ffffff;
}
.title-buttons div:active {
    border-color: #5f5f5f #ffffff #ffffff #5f5f5f;
}
.title-buttons .close {
    background: #e81123;
}

.content {
    padding: 10px;
    font-size: 13px;
    overflow-y: auto;
    flex-grow: 1;
}

.blog-window {
    width: 540px;
    top: 80px;
    left: 180px;
    transform: rotate(-1deg);
    max-height: 500px;
}

.blog-header {
    background: repeating-linear-gradient(
        90deg,
        #d7ecff,
        #d7ecff 20px,
        #c3e0ff 20px,
        #c3e0ff 40px
    );
    padding: 20px;
    border-bottom: 3px groove white;
    text-align: center;
}

.blog-header h1 {
    font-size: 44px;
    letter-spacing: -2px;
    color: black;
    text-shadow: 2px 2px white;
}

.blog-header p {
    margin-top: 8px;
    font-size: 14px;
}

.post {
    margin-top: 14px;
    background: white;
    padding: 12px;
    border: 2px inset #d3d3d3;
}

.post h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #003399;
}

.post img {
    width: 100%;
    margin-top: 10px;
    border: 2px solid black;
    filter: contrast(1.1) saturate(1.2);
}

.side-window {
    width: 240px;
    left: 760px;
    top: 120px;
    transform: rotate(2deg);
}

.side-window ul {
    margin-left: 18px;
    margin-top: 8px;
}

.side-window li {
    margin-bottom: 8px;
    color: #0000cc;
    text-decoration: underline;
}

.chat-window {
    width: 260px;
    top: 400px;
    left: 90px;
    transform: rotate(-2deg);
}

.chat-box {
    background: black;
    color: #00ff66;
    font-family: "Courier New", monospace;
    padding: 10px;
    height: 160px;
    overflow: hidden;
    font-size: 12px;
}

.cursor {
    display: none; /* using actual CSS cursor instead */
}

.sticker {
    position: absolute;
    filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.4));
    pointer-events: none;
    z-index: 500;
}

.sticker.globe {
    width: 90px;
    top: 30px;
    left: 700px;
}

.sticker.phone {
    width: 120px;
    top: 500px;
    left: 800px;
    transform: rotate(15deg);
}

.notepad-window {
    width: 300px;
    top: 450px;
    left: 550px;
}

.notepad-text {
    background-color: #fff;
    background-image: linear-gradient(#9191ff 1px, transparent 1px), linear-gradient(90deg, #ffffff 1px, transparent 1px);
    background-size: 100% 28px, 2px 100%;
    background-position: 0 5px, 30px 0;
    font-family: "Courier New", monospace;
    font-size: 20px;
    padding: 10px 10px 10px 45px;
    min-height: 180px;
    line-height: 28px;
    color: #333;
}

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 42px;
    background: linear-gradient(to bottom, #245edb, #1941a5);
    border-top: 2px solid #8cb4ff;
    display: flex;
    align-items: center;
    padding: 0 8px;
    z-index: 10000;
}

.start-button {
    background: linear-gradient(to bottom, #52c234, #2f8f1f);
    color: white;
    font-weight: bold;
    border-radius: 4px;
    padding: 6px 14px;
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.start-button:active {
    background: linear-gradient(to bottom, #2f8f1f, #52c234);
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.5);
}

.taskbar-apps {
    flex-grow: 1;
    display: flex;
    padding: 0 5px;
    gap: 4px;
}

.taskbar-app {
    margin-left: 10px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.taskbar-app.active {
    background: rgba(255,255,255,0.4);
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.5);
}

.system-tray {
    background: #0f8aff;
    border-left: 1px solid #0f3cac;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: white;
    font-size: 12px;
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.4);
}

.marquee {
    position: absolute;
    top: 20px;
    right: 100px;
    background: white;
    border: 3px ridge #c0c0c0;
    width: 220px;
    padding: 6px;
    font-size: 12px;
    z-index: 900;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 42px;
    left: 0;
    width: 250px;
    background-color: #c0c0c0;
    border: 3px solid;
    border-color: #ffffff #5f5f5f #5f5f5f #ffffff;
    box-shadow: 2px -2px 10px rgba(0,0,0,0.5);
    z-index: 10001;
    display: flex;
    flex-direction: column;
}
.start-menu-banner {
    background: linear-gradient(to bottom, #0a246a, #3a6ea5);
    color: white;
    padding: 10px;
    font-weight: bold;
    font-size: 16px;
}
.start-menu-items {
    padding: 5px;
}
.start-item {
    padding: 8px 10px;
    font-size: 13px;
    color: black;
}
.start-item:hover {
    background-color: #0a246a;
    color: white;
}
hr {
    border: 0;
    border-top: 1px solid #5f5f5f;
    border-bottom: 1px solid #ffffff;
    margin: 5px 0;
}

/* --- NUEVOS ESTILOS --- */
.chat-input-area {
    display: flex;
    padding: 5px;
    background: #c0c0c0;
    border-top: 2px ridge white;
}
.chat-input-area input {
    flex-grow: 1;
    font-family: 'Tahoma';
    border: 2px inset #fff;
    padding: 2px;
}
.chat-input-area button {
    margin-left: 5px;
    padding: 2px 10px;
    background: #c0c0c0;
    border: 2px outset #fff;
    font-family: 'Tahoma';
    font-weight: bold;
}
.chat-input-area button:active {
    border-style: inset;
}

/* WinAmp Style */
.music-player-window {
    width: 280px;
    background: #2a2a2a;
    border: 2px solid #555;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.8);
    border-radius: 4px;
    top: 150px;
    left: 450px;
}
.mp-title-bar {
    background: linear-gradient(to right, #111, #333);
    color: #ccc;
    font-size: 11px;
    padding: 2px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #000;
    cursor: default;
}
.mp-controls { display: flex; gap: 2px; }
.mp-controls div { width: 12px; height: 12px; background: #555; font-size: 9px; text-align: center; line-height: 12px; color: white; cursor: pointer; border: 1px outset #888; }
.mp-controls div:active { border-style: inset; }
.mp-body { padding: 8px; background: linear-gradient(to bottom, #333, #111); border-top: 1px solid #555; }
.mp-lcd { background: #000; border: 2px inset #444; padding: 5px; border-radius: 3px; margin-bottom: 8px; display: grid; grid-template-columns: 40px 1fr; gap: 5px; }
.mp-time { color: #0f0; font-family: "Courier New", monospace; font-size: 14px; font-weight: bold; align-self: center; }
.mp-marquee { grid-column: 2; color: #0f0; font-family: "VT323", "Courier New", monospace; font-size: 12px; overflow: hidden; white-space: nowrap; }
.mp-eq { grid-column: 1 / -1; display: flex; align-items: flex-end; height: 15px; gap: 2px; margin-top: 5px; }
.mp-eq .bar { width: 100%; background: linear-gradient(to top, green, yellow, red); opacity: 0.8; }
.bar-1 { height: 40%; } .bar-2 { height: 80%; } .bar-3 { height: 60%; } .bar-4 { height: 90%; } .bar-5 { height: 50%; } .bar-6 { height: 70%; } .bar-7 { height: 30%; }
.mp-buttons { display: flex; justify-content: space-between; gap: 2px; }
.mp-btn { flex-grow: 1; background: linear-gradient(to bottom, #666, #333); border: 2px outset #888; color: #fff; font-size: 12px; padding: 2px 0; border-radius: 2px; }
.mp-btn:active { border-style: inset; background: #222; }
.mp-eject { color: #f55; }

/* Frutiger Aero Photo Viewer */
.frutiger-window {
    width: 450px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255,255,255,0.5);
    top: 200px;
    left: 400px;
}
.fa-title-bar {
    background: linear-gradient(to bottom, rgba(200,230,255,0.7), rgba(150,200,255,0.5));
    color: #004488;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
    padding: 8px 10px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.6);
    border-radius: 8px 8px 0 0;
}
.fa-controls { display: flex; gap: 5px; }
.fa-controls div { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.2); cursor: pointer; box-shadow: inset 0 2px 4px rgba(255,255,255,0.8); }
.fa-min { background: radial-gradient(circle at 30% 30%, #ffeb99, #ffcc00); }
.fa-max { background: radial-gradient(circle at 30% 30%, #b3ffb3, #33cc33); }
.fa-close { background: radial-gradient(circle at 30% 30%, #ff9999, #cc0000); }
.fa-body { padding: 15px; background: rgba(255,255,255,0.2); }
.fa-main-photo { background: #000; padding: 2px; border: 1px solid rgba(0,0,0,0.5); border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); margin-bottom: 15px; }
.fa-main-photo img { width: 100%; height: auto; display: block; border-radius: 2px; }
.fa-thumbnails { display: flex; gap: 10px; justify-content: center; overflow-x: auto; padding-bottom: 5px; }
.fa-thumb { width: 60px; height: 45px; border: 2px solid transparent; border-radius: 4px; overflow: hidden; opacity: 0.7; cursor: pointer; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.fa-thumb:hover { opacity: 1; transform: scale(1.05); }
.fa-thumb.active { border-color: #00aaff; opacity: 1; box-shadow: 0 0 10px #00aaff; }
.fa-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* --- BUBBLES EFFECT (FRUTIGER AERO) --- */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1; /* Behind icons and windows */
}

.bubble {
    position: absolute;
    bottom: -150px;
    border-radius: 50%;
    /* Crystalline glass gradient */
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.15) 30%,
        rgba(0, 180, 255, 0.1) 60%,
        rgba(255, 255, 255, 0.4) 80%,
        rgba(255, 255, 255, 0) 100%
    );
    box-shadow: 
        inset -5px -5px 15px rgba(0, 100, 255, 0.1),
        inset 5px 5px 10px rgba(255, 255, 255, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.45);
    pointer-events: none;
    animation: floatUp 15s linear infinite;
    backdrop-filter: blur(0.5px);
}

/* Glass glare highlight */
.bubble::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 12%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 80%);
    border-radius: 50%;
    transform: rotate(-30deg);
}

/* Secondary softer glow */
.bubble::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 15%;
    width: 15%;
    height: 15%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.75;
    }
    90% {
        opacity: 0.75;
    }
    100% {
        transform: translateY(calc(-100vh - 200px)) translateX(var(--sway-x, 60px)) rotate(180deg) scale(1.05);
        opacity: 0;
    }
}

@media(max-width: 900px){
    body {
        overflow: auto !important; /* Allow scrolling the desktop canvas */
    }

    .desktop {
        width: 1000px; /* Fixed retro canvas width so elements don't collapse */
        height: 700px; /* Fixed retro canvas height */
        position: relative;
    }

    /* Keep everything visible and styled as absolute */
    .window {
        box-shadow: 4px 4px 15px rgba(0,0,0,0.2);
    }

    .desktop-icon,
    .cursor,
    .sticker,
    .marquee,
    .bubbles-container {
        display: block !important;
    }
}
