:root {
    --w95-face: #c0c0c0;
    --w95-hilite: #ffffff;
    --w95-shadow: #808080;
    --w95-blue: #000080;
    --w95-hover: #d4d0c8;
    --w95-pressed: #dfdfdf;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #008080; /* Default Win95 teal, will be overridden by wallpaper-selector.js */
    height: 100vh;
    overflow: hidden;
    cursor: default;
}

.desktop {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    bottom: 40px; /* Account for taskbar */
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 20px;
    z-index: 1;
    overflow: visible;
    max-height: calc(100vh - 60px); /* Ensure icons stay above taskbar */
}

.desktop-icon {
    width: 64px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    padding: 4px;
}

.desktop-icon:hover {
    background: rgba(0, 0, 128, 0.2);
    outline: 1px dotted #000080;
}

.desktop-icon:active {
    background: rgba(0, 0, 128, 0.4);
}

.desktop-icon .win95-icon {
    display: block;
    margin: 0 auto 4px;
    width: 32px;
    height: 32px;
    background-size: 32px 32px;
}

/* Pump.fun icon styling */
.desktop-icon .pump-icon {
    display: block;
    margin: 0 auto 4px;
    width: 32px;
    height: 32px;
    image-rendering: auto;
}

/* X Community icon styling */
.desktop-icon .x-icon {
    display: block;
    margin: 0 auto 4px;
    width: 32px;
    height: 32px;
    image-rendering: auto;
}

/* Wiki icon styling */
.desktop-icon .wiki-icon {
    display: block;
    margin: 0 auto 4px;
    width: 32px;
    height: 32px;
    image-rendering: auto;
}

/* Moonshot icon styling */
.desktop-icon .moonshot-icon {
    display: block;
    margin: 0 auto 4px;
    width: 32px;
    height: 32px;
    image-rendering: auto;
}

.icon-label {
    font-size: 11px;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
    font-family: 'MS Sans Serif', sans-serif;
    word-wrap: break-word;
}

/* Windows 95 style window */
.window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 500px;
    max-height: 80vh;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

/* Clippy Info Window - always on top right */
#info-window {
    z-index: 150; /* Higher than other windows */
    position: fixed; /* Use fixed to ensure it stays in viewport */
}

.window-header {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: white;
    padding: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    flex-shrink: 0;
}

/* Inactive window header */
.window.inactive .window-header {
    background: linear-gradient(90deg, #7f7f7f, #b5b5b5);
    color: #eaeaea;
}

.window-title {
    font-weight: bold;
    font-size: 14px;
    padding: 0 5px;
}

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

.window-controls button {
    width: 20px;
    height: 20px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-controls button:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

.window-content {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-area {
    background: white;
    border: 2px inset #c0c0c0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Courier New', monospace;
    min-height: 0;
    max-height: 100%;
}

.system-message {
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

.user-message {
    background: #e8e8e8;
    padding: 8px;
    margin: 5px 0;
    border-radius: 3px;
}

.clippy-message {
    background: #fff3cd;
    padding: 8px;
    margin: 5px 0;
    border-radius: 3px;
    border-left: 4px solid #ffc107;
}

/* Loading message animation */
.loading-message {
    background: #f0f0f0;
    padding: 8px;
    margin: 5px 0;
    border-radius: 3px;
    border-left: 4px solid #008080;
    font-style: italic;
    color: #666;
}

.loading-dots::after {
    content: '.';
    animation: dots 1.5s steps(1, end) infinite;
}

@keyframes dots {
    0%, 25% { 
        content: '.'; 
    }
    50% { 
        content: '..'; 
    }
    75%, 100% { 
        content: '...'; 
    }
}

.chat-input {
    display: flex;
    padding: 10px;
    gap: 5px;
    border-top: 2px groove #c0c0c0;
}

#user-input {
    flex: 1;
    padding: 5px;
    border: 2px inset #c0c0c0;
    font-family: 'Courier New', monospace;
}

#send-btn {
    padding: 5px 15px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
}

#send-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

/* Real Clippy Agent positioning */
#clippy-agent {
    position: fixed;
    bottom: 50px;
    right: 50px;
    z-index: 1000;
}

/* Clippy Character (SVG version - now hidden) */
#clippy-container {
    position: fixed;
    bottom: 50px;
    right: 50px;
    z-index: 1000;
}

.clippy {
    width: 100px;
    height: 150px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.clippy:hover {
    transform: scale(1.05);
}

.clippy.idle {
    animation: idle 4s infinite;
}

.clippy.talking {
    animation: talking 0.5s infinite;
}

.clippy.annoyed {
    animation: annoyed 0.3s 3;
}

.clippy.sleeping svg {
    opacity: 0.7;
}

@keyframes idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes talking {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes annoyed {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Eyes animation */
.pupil-left, .pupil-right {
    transition: transform 0.1s ease-out;
    transform-origin: center;
}

/* Speech Bubble */
.speech-bubble {
    position: fixed;
    left: -9999px;  /* Parked offscreen until JS positions it */
    top: -9999px;
    background: #ffffcc;
    border: 2px solid black;
    border-radius: 10px;
    padding: 15px;
    max-width: 260px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    will-change: left, top;  /* Smoother animation */
    z-index: 2000;
}

.speech-bubble.hidden {
    display: none;
}

.bubble-content {
    position: relative;
}

.bubble-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    background: red;
    color: white;
    border: 1px solid black;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

#bubble-text {
    font-family: 'Comic Sans MS', cursive;
    font-size: 14px;
    line-height: 1.4;
}

.bubble-tail {
    position: absolute;
    top: 20px;  /* Positioned on the side, not bottom */
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

/* Tail pointing right (when bubble is on left of Clippy) */
.speech-bubble.left .bubble-tail {
    right: -10px;
    left: auto;
    border-left: 10px solid #ffffcc;
    border-right: none;
}

.speech-bubble.left .bubble-tail::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 2px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid black;
}

/* Tail pointing left (when bubble is on right of Clippy) */
.speech-bubble.right .bubble-tail {
    left: -10px;
    right: auto;
    border-right: 10px solid #ffffcc;
    border-left: none;
}

.speech-bubble.right .bubble-tail::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 2px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid black;
}

/* Typewriter effect */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 2s steps(40, end);
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.context-menu.hidden {
    display: none;
}

.context-menu ul {
    list-style: none;
    padding: 2px;
}

.context-menu li {
    padding: 5px 20px;
    cursor: pointer;
    font-size: 14px;
}

.context-menu li:hover {
    background: #000080;
    color: white;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 16px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #c0c0c0;
    border: 1px solid #808080;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #808080;
    border: 2px solid #c0c0c0;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #606060;
}

/* Z's animation for extra grumpiness */
.sleeping::after {
    content: 'Z';
    position: absolute;
    top: -20px;
    right: 10px;
    font-size: 20px;
    font-weight: bold;
    animation: float 2s infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0;
    }
    50% { 
        transform: translate(10px, -20px) scale(1.5); 
        opacity: 1;
    }
}

/* Info Window Content Styles */
.info-content {
    padding: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.info-section {
    background: white;
    border: 2px inset #c0c0c0;
    padding: 10px;
    flex: 1;
}

.info-heading {
    font-size: 12px;
    font-weight: bold;
    color: #000080;
    margin: 0 0 8px 0;
    text-align: center;
    font-family: 'MS Sans Serif', sans-serif;
}

.info-divider {
    height: 2px;
    margin: 8px 0;
    border-top: 1px solid #808080;
    border-bottom: 1px solid #ffffff;
}

.info-label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #000;
    font-family: 'MS Sans Serif', sans-serif;
}

.ca-input-group {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.ca-input {
    flex: 1;
    padding: 2px 4px;
    border: 2px inset #c0c0c0;
    background: white;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: #000;
}

.btn-copy {
    padding: 2px 10px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
}

.btn-copy:hover {
    background: #d4d0c8;
}

.btn-copy:active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 3px 9px 1px 11px;
}

.button-group {
    display: flex;
    gap: 4px;
}

.btn-link {
    flex: 1;
    padding: 4px 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.btn-link:hover {
    background: #d4d0c8;
}

.btn-link:active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 5px 7px 3px 9px;
}

/* Taskbar button (when minimized) */
.task-btn {
    position: fixed;
    left: 8px;
    bottom: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    padding: 4px 8px;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 12px;
    box-shadow: 1px 1px 0 #000;
    cursor: pointer;
    z-index: 2001;
    display: none;
}

.task-btn:active {
    border-color: #808080 #fff #fff #808080;
}

/* Bevel utilities */
.bevel-raised {
    border: 2px solid;
    border-color: var(--w95-hilite) var(--w95-shadow) var(--w95-shadow) var(--w95-hilite);
}

.bevel-sunken {
    border: 2px solid;
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
}

/* Windows 95 Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35px;
    background: var(--w95-face);
    box-shadow: inset 0 1px 0 var(--w95-hilite), inset 0 -1px 0 var(--w95-shadow);
    display: flex;
    align-items: center;
    z-index: 10000;
    user-select: none;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
}

/* Start Button */
.start-button {
    height: 28px;
    margin: 3px;
    padding: 0 8px;
    background: var(--w95-face);
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: inherit;
    border: none;
}

.start-button:not(.active) {
    border: 2px solid;
    border-color: var(--w95-hilite) var(--w95-shadow) var(--w95-shadow) var(--w95-hilite);
}

.start-button.active {
    border: 2px solid;
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
    background: var(--w95-pressed);
}

/* Windows logo icon in start button */
.start-button .win95-icon-windows-logo {
    width: 16px;
    height: 14px;
    margin-right: 2px;
}

.start-text {
    color: #000000;
    font-weight: bold;
}

/* Taskbar Divider */
.taskbar-divider {
    width: 2px;
    height: 26px;
    margin: 0 3px;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
}

/* Taskbar Buttons Area */
.taskbar-buttons {
    flex: 1;
    display: flex;
    gap: 2px;
    padding: 0 3px;
    min-width: 0;
}

/* Individual Taskbar Button */
.taskbar-button {
    height: 28px;
    padding: 0 6px;
    min-width: 120px;
    max-width: 180px;
    border: none;
    background: var(--w95-face);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
}

.taskbar-button:not(.active) {
    border: 2px solid;
    border-color: var(--w95-hilite) var(--w95-shadow) var(--w95-shadow) var(--w95-hilite);
}

.taskbar-button.active {
    border: 2px solid;
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
    background: var(--w95-pressed);
    font-weight: bold;
}

.taskbar-button .window-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.taskbar-button .window-text {
    overflow: hidden;
    text-overflow: ellipsis;
    color: #000000;
}

/* System Tray */
.taskbar-tray {
    display: flex;
    align-items: center;
    padding: 0 2px;
    gap: 4px;
}

.tray-icons {
    display: flex;
    gap: 4px;
    padding: 0 4px;
    margin-right: 4px;
    border-left: 1px solid var(--w95-shadow);
    border-top: 1px solid var(--w95-shadow);
    border-right: 1px solid var(--w95-hilite);
    border-bottom: 1px solid var(--w95-hilite);
}

.tray-icon {
    font-size: 14px;
    cursor: pointer;
    padding: 2px;
}

.tray-icon:hover {
    background: rgba(0, 0, 128, 0.1);
}

/* Taskbar Clock */
.taskbar-clock {
    background: #dfdfdf;
    border: 2px inset var(--w95-shadow);
    padding: 2px 8px;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    margin-right: 2px;
}

#clock-time {
    color: #000000;
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 200px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    font-family: 'MS Sans Serif', sans-serif;
}

.start-menu-sidebar {
    width: 25px;
    background: linear-gradient(to bottom, #000080, #1084d0);
    color: white;
    writing-mode: vertical-lr;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 2px;
}

.sidebar-text {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    transform: rotate(180deg);
}

.start-menu-content {
    flex: 1;
    padding: 2px;
}

.start-menu-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 11px;
    position: relative;
}

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

.menu-icon {
    margin-right: 8px;
    vertical-align: middle;
}

.menu-arrow {
    position: absolute;
    right: 8px;
    font-size: 10px;
}

.start-menu-separator {
    height: 2px;
    margin: 2px 4px;
    border-top: 1px solid #808080;
    border-bottom: 1px solid #ffffff;
}

/* Adjust main window to account for taskbar */
.window {
    max-height: calc(100vh - 40px);
}

/* Adjust Clippy and other fixed elements */
#clippy-container,
#clippy-agent {
    bottom: 40px !important;
}

/* 16x16 Bitmap Icons (No Emojis) */
.icon-16 {
    width: 16px;
    height: 16px;
    display: inline-block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Folder icon */
.icon-folder {
    background: linear-gradient(to bottom, #ffeb3b 0%, #ffc107 100%);
    border: 1px solid #333;
    position: relative;
}
.icon-folder::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 8px;
    height: 3px;
    background: #ffc107;
    border: 1px solid #333;
    border-bottom: none;
}

/* Program/EXE icon */
.icon-program {
    background: linear-gradient(135deg, #4fc3f7 0%, #0277bd 100%);
    border: 1px solid #333;
    position: relative;
}
.icon-program::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid rgba(255,255,255,0.5);
}

/* Document icon */
.icon-document {
    background: white;
    border: 1px solid #333;
    position: relative;
}
.icon-document::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 1px;
    background: #333;
    box-shadow: 0 3px 0 #333, 0 6px 0 #333;
}
.icon-document::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, transparent 50%, #333 50%);
}

/* Settings/Gear icon */
.icon-settings {
    background: #808080;
    border-radius: 50%;
    position: relative;
    border: 2px solid #606060;
}
.icon-settings::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #c0c0c0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.icon-settings::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #808080;
    transform: translateX(-50%);
    box-shadow: 7px 0 0 #808080, -7px 0 0 #808080;
}

/* Search/Magnifier icon */
.icon-search {
    width: 10px;
    height: 10px;
    border: 2px solid #333;
    border-radius: 50%;
    position: relative;
    margin: 2px;
}
.icon-search::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 6px;
    height: 2px;
    background: #333;
    transform: rotate(45deg);
}

/* Help icon */
.icon-help {
    background: #0066cc;
    border-radius: 50%;
    position: relative;
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    line-height: 16px;
}
.icon-help::after {
    content: '?';
}

/* Run icon */
.icon-run {
    background: white;
    border: 1px solid #333;
    position: relative;
}
.icon-run::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 2px;
    width: 8px;
    height: 8px;
    background: #333;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Shutdown icon */
.icon-shutdown {
    background: #ff4444;
    border-radius: 50%;
    position: relative;
    border: 1px solid #cc0000;
}
.icon-shutdown::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    width: 2px;
    height: 6px;
    background: white;
    transform: translateX(-50%);
}

/* Clippy icon for taskbar */
.icon-clippy {
    background: linear-gradient(to bottom, #e0e0e0 0%, #999 100%);
    border-radius: 20% 20% 50% 50%;
    border: 1px solid #666;
    position: relative;
}
.icon-clippy::before,
.icon-clippy::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: #333;
    border-radius: 50%;
    top: 4px;
}
.icon-clippy::before { left: 3px; }
.icon-clippy::after { right: 3px; }

/* Volume icon */
.icon-volume {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 0 4px 6px;
    border-color: transparent transparent transparent #333;
    position: relative;
    margin: 4px 6px;
}
.icon-volume::before {
    content: '';
    position: absolute;
    left: -8px;
    top: -2px;
    width: 3px;
    height: 4px;
    background: #333;
}
.icon-volume::after {
    content: '';
    position: absolute;
    left: 2px;
    top: -4px;
    width: 4px;
    height: 8px;
    border: 2px solid #333;
    border-left: none;
    border-radius: 0 50% 50% 0;
}

/* Network icon */
.icon-network {
    position: relative;
    width: 16px;
    height: 16px;
}
.icon-network::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #333;
    transform: translateX(-50%);
    clip-path: polygon(40% 0%, 60% 0%, 100% 100%, 0% 100%);
}
.icon-network::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 8px;
    border: 2px solid #333;
    border-bottom: none;
    border-radius: 50% 50% 0 0;
}

/* Mobile responsive - Complete mobile experience */
@media (max-width: 768px) {
    /* Reset body for mobile */
    body {
        background: #f0f0f0 !important;
        overflow: auto;
        height: 100vh;
        background-image: none !important;
    }
    
    /* Hide all desktop elements */
    .desktop-icons,
    .taskbar,
    #info-window,
    #ie-window,
    #display-properties-window,
    .start-menu,
    .context-menu,
    #context-menu,
    .desktop-context-menu {
        display: none !important;
    }
    
    /* Main chat window - full screen mobile layout */
    #main-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        transform: none !important;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
        display: flex !important;
        flex-direction: column !important;
        z-index: 1 !important;
    }
    
    /* Hide Windows 95 window chrome on mobile */
    #main-window .window-header {
        display: none !important;
    }
    
    /* Full height content */
    #main-window .window-content {
        padding: 0 !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }
    
    /* Chat area takes full space */
    .chat-area {
        border: none !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        background: white !important;
        margin-top: 120px; /* Space for Clippy */
    }
    
    /* Chat messages area */
    .chat-messages {
        flex: 1 !important;
        padding: 15px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    
    /* Message styling for mobile */
    .user-message,
    .clippy-message {
        padding: 12px !important;
        margin: 8px 0 !important;
        border-radius: 12px !important;
        max-width: 85% !important;
        word-wrap: break-word !important;
    }
    
    .user-message {
        background: #007AFF !important;
        color: white !important;
        margin-left: auto !important;
        border-radius: 18px 18px 4px 18px !important;
    }
    
    .clippy-message {
        background: #E5E5EA !important;
        color: black !important;
        margin-right: auto !important;
        border-radius: 18px 18px 18px 4px !important;
        border-left: none !important;
    }
    
    /* Chat input area for mobile */
    .chat-input {
        padding: 10px !important;
        border-top: 1px solid #e0e0e0 !important;
        background: #f8f8f8 !important;
        display: flex !important;
        gap: 10px !important;
        align-items: center !important;
    }
    
    #user-input {
        flex: 1 !important;
        padding: 12px 16px !important;
        border: 1px solid #d0d0d0 !important;
        border-radius: 24px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        background: white !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    }
    
    #send-btn {
        padding: 12px 20px !important;
        background: #007AFF !important;
        color: white !important;
        border: none !important;
        border-radius: 50% !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0 !important; /* Hide text */
        cursor: pointer !important;
        flex-shrink: 0 !important;
    }
    
    #send-btn::before {
        content: '➤' !important;
        font-size: 20px !important;
        color: white !important;
    }
    
    #send-btn:active {
        background: #0051D5 !important;
    }
    
    /* Clippy container for mobile */
    #clippy-container {
        position: fixed !important;
        top: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        bottom: auto !important;
        z-index: 100 !important;
    }
    
    /* Scale down Clippy agent for mobile */
    #clippy-agent {
        transform: scale(0.7) !important;
        transform-origin: center top !important;
    }
    
    /* Mobile speech bubble */
    .speech-bubble {
        position: fixed !important;
        top: 80px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 280px !important;
        background: #FFE4B5 !important;
        border: 2px solid #333 !important;
        border-radius: 12px !important;
        padding: 12px !important;
        font-size: 14px !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
        z-index: 101 !important;
    }
    
    .speech-bubble.hidden {
        display: block !important;
    }
    
    /* Always show mobile message */
    .speech-bubble.mobile-message {
        display: block !important;
        background: #fff3cd !important;
        border-color: #ffc107 !important;
    }
    
    .bubble-tail {
        display: none !important; /* Hide tail on mobile */
    }
    
    .bubble-close {
        display: none !important; /* Hide close button for persistent message */
    }
    
    /* Mobile-specific text in bubble */
    #bubble-text {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        text-align: center !important;
    }
    
    /* Hide system message on mobile */
    .system-message {
        display: none !important;
    }
}