/* File Investigation Game Styles */
.investigation-modal {
    font-family: 'Tahoma', sans-serif;
    user-select: none;
}

.investigation-modal .title-bar {
    font-size: 11px;
    font-weight: bold;
}

.investigation-modal .modal-content {
    background: #c0c0c0;
}

.investigation-modal button {
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    padding: 2px 8px;
    border: 1px outset #c0c0c0;
    background: #c0c0c0;
    cursor: pointer;
}

.investigation-modal button:hover {
    background: #d0d0d0;
}

.investigation-modal button:active {
    border: 1px inset #c0c0c0;
}

.investigation-modal input[type="text"] {
    font-family: 'Courier New', monospace;
    padding: 4px;
    border: 1px inset #c0c0c0;
    background: white;
    width: 200px;
}

.investigation-modal select {
    font-family: 'Tahoma', sans-serif;
    padding: 2px;
    border: 1px inset #c0c0c0;
    background: white;
}

/* Windows XP Style Window System */
.window {
    position: fixed;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    font-family: 'Tahoma', sans-serif;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3);
}

.window .title-bar {
    background: linear-gradient(to right, #0078d4, #106ebe);
    color: white;
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    font-weight: bold;
    font-size: 12px;
    user-select: none;
}

.window .title-bar:active {
    background: linear-gradient(to right, #0066b8, #1051a0);
}

.window .window-buttons {
    display: flex;
    gap: 2px;
}

.window .window-buttons button {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    width: 20px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Tahoma', sans-serif;
}

.window .window-buttons button:hover {
    background: #d0d0d0;
}

.window .window-buttons button:active {
    border: 1px inset #c0c0c0;
    background: #b0b0b0;
}

.window .window-content {
    background: #c0c0c0;
    overflow-y: auto;
}

/* Draggable windows should be brought to front when active */
.window.dragging {
    z-index: 10020 !important;
}

.file-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.file-list-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    background: #c0c0c0;
}

.file-list-item:hover {
    background: rgba(0, 120, 212, 0.1);
    border: 1px solid rgba(0, 120, 212, 0.3);
}

.file-list-item:active {
    background: rgba(0, 120, 212, 0.2);
    border: 1px solid rgba(0, 120, 212, 0.5);
}

.file-list-item.corrupted {
    color: #cc0000;
    font-style: italic;
}

.file-list-item.corrupted::before {
    content: "⚠️ ";
    margin-right: 4px;
}

.file-list-item.encrypted {
    color: #ff8800;
}

.file-list-item.encrypted::before {
    content: "🔒 ";
    margin-right: 4px;
}

.file-list-item.hidden {
    opacity: 0.5;
}

.file-list-item.hidden::before {
    content: "👻 ";
    margin-right: 4px;
}

.evidence-preview {
    background: #1a1a1a;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    font-size: 11px;
    line-height: 1.3;
    margin: 10px 0;
    border: 1px inset #c0c0c0;
}

.repair-puzzle {
    background: #f0f0f0;
    border: 1px inset #c0c0c0;
    padding: 10px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.analysis-task {
    background: #f8f8f8;
    border: 1px inset #c0c0c0;
    padding: 10px;
    margin: 10px 0;
}

.progress-checklist {
    font-size: 11px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.completion-notice {
    animation: pulse 1s infinite;
}

/* Progress panel enhancements */
#progress-panel {
    backdrop-filter: blur(5px);
    font-family: 'Tahoma', sans-serif;
}

#progress-panel h3 {
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.progress-bar-container {
    background: rgba(255,255,255,0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
    border: 1px inset #c0c0c0;
}

#progress-bar {
    background: linear-gradient(to right, #4CAF50, #45a049);
    height: 100%;
    transition: width 0.5s ease-in-out;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

/* File Explorer specific styling */
#file-explorer-window {
    min-width: 600px;
    min-height: 400px;
}

#file-explorer-content {
    background: white;
    border: 1px inset #c0c0c0;
    padding: 8px;
    margin: 4px;
    min-height: 300px;
}

/* Prevent text selection during dragging */
.dragging * {
    user-select: none !important;
    pointer-events: none !important;
}

.dragging .title-bar {
    pointer-events: auto !important;
}

/* Level selection locked overlay improvements */
.level-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
body {
  margin: 0;
  font-family: Tahoma, sans-serif;
  background-image: url('icons/xp-wallpaper.jpg');

}
#desktop{height:100vh;position:relative;}





/* === windows ==== */
.window,.popup-window{
  position:absolute;          /* important for dragging */
  border:2px solid #000080;
  background:#c0c0c0;
  box-shadow:3px 3px 0 #000;
  z-index:10;
  pointer-events:auto;
}
.title-bar{
  display:flex;justify-content:space-between;align-items:center;
  padding:4px;
  background:linear-gradient(to right,#000080,#0000cd);
  color:#fff;font-weight:bold;cursor:move;
}
.window-buttons button{
  width:20px;height:20px;margin-left:2px;font-size:10px;cursor:pointer;
}
.window-content{padding:10px;background:#fff;}
.folder-icon{width:50px;height:50px;image-rendering:pixelated;cursor:pointer;}
table td{text-align:center;padding:10px;font-size:12px;}

/* ==== task-bar ==== */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, #2573CF 0%, #1B58BA 8%, #1B58BA 40%, #2B66C9 88%, #3B7CE4 93%, #3B7CE4 100%);
  border-top: 1px solid #5C9AFF;
  padding: 0;
  z-index: 1000;
}

.xp-start-button {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0 10px;
  background: linear-gradient(to bottom, #3B7CE4 0%, #2B66C9 8%, #1B58BA 40%, #1B58BA 88%, #2573CF 93%, #2573CF 100%);
  border: none;
  border-right: 1px solid #1B58BA;
  cursor: pointer;
  margin: 0;
}

.xp-start-button:hover {
  background: linear-gradient(to bottom, #5C9AFF 0%, #3B7CE4 8%, #2B66C9 40%, #2B66C9 88%, #1B58BA 93%, #1B58BA 100%);
}

.xp-start-button:active {
  background: linear-gradient(to bottom, #1B58BA 0%, #2B66C9 8%, #3B7CE4 40%, #3B7CE4 88%, #5C9AFF 93%, #5C9AFF 100%);
}

.xp-start-button img {
  width: 25px;
  height: 25px;
  vertical-align: middle;
}

.start-text {
  color: white;
  font-family: Tahoma, sans-serif;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.7);
}

#clock {
  margin-left: auto;
  padding: 0 10px;
  color: white;
  font-family: Tahoma, sans-serif;
  font-size: 12px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.7);
}

/* dynamic task-bar buttons for windows */
.taskbar-window-button{
  background:#c0c0c0;border:2px outset #fff;
  font-size:12px;padding:2px 8px;cursor:pointer;
  display:flex;align-items:center;max-width:160px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}

#start-menu {
  position: fixed;
  left: 0;
  bottom: 30px;
  z-index: 9999;
  width: 380px;
  font-family: Tahoma, sans-serif;
  background: #fff;
  border: 2px solid #0C3FB4;
  border-top: 1px solid #8CCEFF;
  border-left: 1px solid #8CCEFF;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.xp-menu {
  display: flex;
  height: 480px;
  background: #fff;
}

.xp-menu-left {
  width: 250px;
  background: linear-gradient(to bottom, #5594E2 0%, #3B7CE4 100%);
  padding: 6px 0;
}

.xp-menu-logo {
  display: flex;
  align-items: center;
  padding: 8px;
  margin-bottom: 10px;
  background: linear-gradient(to right, transparent 0%, #3B7CE4 100%);
}

.xp-menu-label {
  color: white;
  font-weight: bold;
  margin-left: 10px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.xp-menu-user {
  display: flex;
  align-items: center;
  padding: 8px;
  background: linear-gradient(to right, #7BAFF4 0%, #5594E2 100%);
  border-top: 1px solid #8CCEFF;
  border-bottom: 1px solid #3B7CE4;
}

.xp-user-icon {
  width: 48px;
  height: 48px;
  border: 2px solid white;
}

.xp-user-name {
  color: white;
  font-weight: bold;
  margin-left: 10px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.xp-menu-list {
  margin-top: 10px;
}

.xp-menu-item {
  display: flex;
  align-items: center;
  padding: 8px;
  color: black;
  cursor: pointer;
}

.xp-menu-item:hover {
  background: #316AC5;
  color: white;
}

.xp-menu-icon {
  width: 32px;
  height: 32px;
  margin-right: 8px;
}

.xp-menu-right {
  width: 130px;
  background: #ECE9D8;
  border-left: 1px solid #fff;
  padding: 10px;
}

.xp-menu-search {
  margin-bottom: 10px;
}

.xp-search {
  width: 100%;
  padding: 4px;
  border: 1px solid #7F9DB9;
}

.xp-menu-shutdown {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px;
  margin-top: auto;
  background: #ECE9D8;
  border: 1px solid #7F9DB9;
  cursor: pointer;
}

.xp-menu-shutdown:hover {
  background: #316AC5;
  color: white;
}

.xp-menu-shutdown img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.vista-menu {
  display: flex;
  background: linear-gradient(135deg, #eaf6ff 0%, #cbe2f7 100%);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border: 1px solid #7baaf7;
  overflow: hidden;
}

.vista-menu-left {
  flex: 2;
  padding: 16px 12px 12px 16px;
  background: rgba(255,255,255,0.95);
}

.vista-user {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.vista-user-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 10px;
  border: 2px solid #7baaf7;
}

.vista-user-name {
  font-weight: bold;
  font-size: 1.1em;
  color: #2d4d7a;
}

.vista-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vista-menu-item {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 1em;
}

.vista-menu-item:hover {
  background: #d0e6fa;
}

.vista-menu-icon {
  width: 22px;
  height: 22px;
  margin-right: 10px;
}

.vista-menu-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background: linear-gradient(135deg, #b3d1f7 0%, #eaf6ff 100%);
  padding: 0 12px 12px 0;
}

.vista-menu-power {
  margin-top: auto;
}

.vista-power-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.3em;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background 0.2s;
}

.vista-power-btn:hover {
  background: #c0392b;
}




/* Windows XP Paint toolbar style */
.paint-toolbar-xp {
  display: flex;
  gap: 6px;
  padding: 6px 0 10px 0;
  background: #ece9d8;
  border-bottom: 2px solid #b5b5b5;
  margin-bottom: 8px;
  box-shadow: 0 1px 0 #fff inset;
}

.paint-color-btn {
  width: 28px;
  height: 28px;
  border: 2px outset #fff;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  box-shadow: 1px 1px 0 #b5b5b5;
  transition: border 0.1s;
}

.paint-color-btn.selected,
.paint-color-btn:focus {
  border: 2px inset #000080;
  outline: 1px solid #000080;
}

/* Notepad Styles */
.notepad-window {
  display: flex;
  flex-direction: column;
}

.notepad-content {
  padding: 0;
  background: #f0f0f0;
  height: calc(100% - 28px);
  display: flex;
  flex-direction: column;
}

.notepad-menu-bar {
  display: flex;
  background: #f0f0f0;
  border-bottom: 1px solid #d0d0d0;
  font-size: 12px;
  font-family: Tahoma, sans-serif;
  position: relative;
  z-index: 1000;
}

.notepad-menu-item {
  padding: 6px 12px;
  cursor: pointer;
  user-select: none;
}

.notepad-menu-item:hover {
  background: #e1f0ff;
  border: 1px solid #316ac5;
}

.notepad-dropdown-menu {
  position: absolute;
  top: 28px;
  left: 0;
  background: #f0f0f0;
  border: 1px solid #a0a0a0;
  border-top: none;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  z-index: 1001;
  min-width: 200px;
  font-size: 12px;
}

.menu-item {
  padding: 4px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.menu-item:hover {
  background: #316ac5;
  color: white;
}

.menu-separator {
  height: 1px;
  background: #d0d0d0;
  margin: 2px 0;
}

.notepad-textarea {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.4;
  background: white;
  resize: none;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.notepad-status-bar {
  display: flex;
  justify-content: space-between;
  background: #f0f0f0;
  border-top: 1px solid #d0d0d0;
  padding: 4px 8px;
  font-size: 11px;
  font-family: Tahoma, sans-serif;
  color: #666;
}

/* Responsive Notepad */
@media (max-width: 768px) {
  .notepad-window {
    width: 95% !important;
    height: 80% !important;
    left: 2.5% !important;
    top: 10% !important;
  }
  
  .notepad-menu-bar {
    flex-wrap: wrap;
  }
  
  .notepad-menu-item {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .notepad-textarea {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .notepad-window {
    width: 100% !important;
    height: 90% !important;
    left: 0 !important;
    top: 5% !important;
  }
  
  .notepad-menu-item {
    padding: 3px 6px;
    font-size: 10px;
  }
  
  .notepad-textarea {
    font-size: 11px;
    padding: 6px;
  }
  
  .notepad-status-bar {
    font-size: 10px;
    padding: 2px 6px;
  }
}

#desktop-icons {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none;
  z-index: 1;
}
.desktop-icon {
  position: absolute;
  pointer-events: auto;
  user-select: none;
}
.desktop-icon img {
  border-radius: 8px;
  background: rgba(255,255,255,0.2);
  margin-bottom: 2px;
}
.desktop-icon:active {
  filter: brightness(0.9);
}

/* Responsive Desktop Layout */
@media (max-width: 768px) {
  .window, .popup-window {
    min-width: 250px !important;
    max-width: calc(100vw - 20px) !important;
  }
  
  .window-content {
    font-size: 12px;
  }
  
  .title-bar {
    font-size: 11px;
    padding: 2px;
  }
  
  .window-buttons button {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
  
  #taskbar {
    height: 35px;
  }
  
  .xp-start-button {
    padding: 0 8px;
  }
  
  .start-text {
    font-size: 12px;
  }
  
  #clock {
    font-size: 11px;
    padding: 0 8px;
  }
  
  #start-menu {
    width: 320px;
    bottom: 35px;
  }
  
  .xp-menu {
    height: 400px;
  }
  
  .xp-menu-left {
    width: 200px;
  }
  
  .xp-menu-right {
    width: 120px;
  }
}

@media (max-width: 480px) {
  .window, .popup-window {
    width: calc(100vw - 10px) !important;
    height: calc(100vh - 80px) !important;
    top: 10px !important;
    left: 5px !important;
  }
  
  .window-content {
    font-size: 11px;
    padding: 5px;
  }
  
  .folder-icon {
    width: 40px;
    height: 40px;
  }
  
  table td {
    padding: 8px;
    font-size: 11px;
  }
  
  #taskbar {
    height: 40px;
  }
  
  .xp-start-button img {
    width: 20px;
    height: 20px;
  }
  
  .start-text {
    font-size: 11px;
  }
  
  #start-menu {
    width: 280px;
    bottom: 40px;
  }
  
  .xp-menu {
    height: 350px;
  }
  
  .xp-menu-left {
    width: 180px;
  }
  
  .xp-menu-right {
    width: 100px;
  }
  
  .xp-menu-item {
    padding: 6px;
    font-size: 11px;
  }
  
  .xp-menu-icon {
    width: 24px;
    height: 24px;
  }
}

/* ===== LIVE CHAT STYLES ===== */

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: linear-gradient(180deg, #ece9d8 0%, #d6d3ce 100%);
  border-bottom: 1px solid #aca899;
  font-size: 11px;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-indicator {
  color: #0f7b0f;
  font-weight: bold;
}

.chat-controls {
  display: flex;
  gap: 4px;
}

.chat-settings-btn,
.clear-chat-btn,
.toggle-sound-btn {
  background: linear-gradient(180deg, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
  border-radius: 2px;
}

.chat-settings-btn:hover,
.clear-chat-btn:hover,
.toggle-sound-btn:hover {
  background: linear-gradient(180deg, #f0ede3 0%, #ddd9d0 100%);
}

.chat-settings-btn:active,
.clear-chat-btn:active,
.toggle-sound-btn:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(180deg, #d6d3ce 0%, #ece9d8 100%);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  background: #ffffff;
  border: 1px inset #d4d0c8;
  margin: 0 8px;
  font-size: 11px;
  line-height: 1.4;
  max-height: 300px;
}

.chat-messages::-webkit-scrollbar {
  width: 16px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #d4d0c8;
  border: 1px inset #d4d0c8;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f0ede3 0%, #ddd9d0 100%);
}

.chat-message {
  margin-bottom: 8px;
  padding: 4px;
  border-radius: 2px;
}

.system-message {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 2px;
  margin: 4px 0;
  background: #f5f5f5;
  border-left: 3px solid #ccc;
}

.user-message {
  background: #f8f8f8;
  border-left: 3px solid #0066cc;
}

.own-message {
  background: #e8f4ff !important;
  border-left: 3px solid #0066cc !important;
}

.other-message {
  background: #f0f8f0;
  border-left: 3px solid #009900;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.username {
  font-weight: bold;
  color: #009900;
}

.own-username {
  color: #0066cc !important;
}

.message-time {
  font-size: 9px;
  color: #666;
}

.message-text {
  word-wrap: break-word;
  padding-left: 2px;
}

.chat-input-area {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: linear-gradient(180deg, #ece9d8 0%, #d6d3ce 100%);
  border-top: 1px solid #aca899;
}

#chatInput {
  flex: 1;
  padding: 4px;
  border: 1px inset #d4d0c8;
  font-size: 11px;
  font-family: 'MS Sans Serif', sans-serif;
  background: #ffffff;
}

#chatInput:focus {
  outline: none;
  border: 1px inset #0066cc;
}

#sendButton {
  padding: 4px 12px;
  background: linear-gradient(180deg, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  font-size: 11px;
  font-family: 'MS Sans Serif', sans-serif;
  cursor: pointer;
  min-width: 50px;
}

#sendButton:hover {
  background: linear-gradient(180deg, #f0ede3 0%, #ddd9d0 100%);
}

#sendButton:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(180deg, #d6d3ce 0%, #ece9d8 100%);
}

.chat-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: linear-gradient(180deg, #d6d3ce 0%, #ece9d8 100%);
  border-top: 1px solid #aca899;
  font-size: 9px;
  color: #666;
}

#chat-status {
  font-weight: normal;
}

#message-counter {
  font-size: 9px;
}

/* Chat window responsive adjustments */
@media (max-width: 768px) {
  .chat-header {
    padding: 6px;
    font-size: 10px;
  }
  
  .chat-messages {
    font-size: 10px;
    padding: 6px;
    max-height: 200px;
  }
  
  .chat-input-area {
    padding: 6px;
  }
  
  #chatInput {
    font-size: 10px;
    padding: 3px;
  }
  
  #sendButton {
    padding: 3px 8px;
    font-size: 10px;
  }
  
  .chat-status-bar {
    padding: 3px 6px;
    font-size: 8px;
  }
}

@media (max-width: 480px) {
  .chat-controls {
    flex-direction: column;
    gap: 2px;
  }
  
  .chat-settings-btn,
  .clear-chat-btn,
  .toggle-sound-btn {
    font-size: 9px;
    padding: 1px 4px;
  }
  
  .chat-messages {
    max-height: 150px;
  }
}