/* style.css - fullscreen & restore drag fixed */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  background: #008080;
  color: #000;
  height: 100vh;
  overflow: hidden;
  image-rendering: pixelated;
  position: relative;
}

.crt-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  background: repeating-linear-gradient(transparent 0px, transparent 2px, rgba(0,255,157,0.03) 2px, rgba(0,255,157,0.03) 4px);
  animation: scanline 10s linear infinite;
  z-index: 9999;
}

@keyframes scanline { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

.window {
  background: #c0c0c0;
  border: 4px solid #dfdfdf;
  border-right-color: #000;
  border-bottom-color: #000;
  box-shadow: 8px 8px 0 #000;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  position: absolute;
  z-index: 10;
  resize: both;
  overflow: hidden;
  min-width: 380px;
  min-height: 38px;
}

.explorer-window {
  width: 95vw;
  max-width: 1200px;
  height: 90vh;
  max-height: 850px;
}

.media-player-window {
  width: 640px;
  height: 480px;
}

.window.minimized {
  height: 38px !important;
  overflow: hidden !important;
  width: 380px !important;
  resize: none !important;
  box-shadow: 4px 4px 0 #000 !important;
  border-width: 2px !important;
  pointer-events: all !important;
}

.window.maximized {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
  resize: none !important;
  min-width: unset !important;
  min-height: unset !important;
  z-index: 999 !important;
}

.title-bar {
  background: linear-gradient(to right, #000080, #1084d0);
  color: white;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.window-buttons button {
  width: 26px;
  height: 26px;
  margin-left: 8px;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  border-right-color: #808080;
  border-bottom-color: #808080;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
}

.window-buttons button:hover { background: #dfdfdf; }
.window-buttons button:active { border-style: inset; }

.toolbar {
  background: #c0c0c0;
  border-bottom: 2px solid #808080;
  padding: 6px 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.toolbar button {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  padding: 3px 8px;
  cursor: pointer;
}

.toolbar button:active { border-style: inset; }

.address-bar {
  flex: 1;
  background: #fff;
  border: 2px inset #808080;
  padding: 4px 8px;
}

.main-content {
  flex: 1;
  display: flex;
  background: #fff;
  border: 2px inset #dfdfdf;
  overflow: hidden;
}

.sidebar {
  width: 220px;
  background: #c0c0c0;
  border-right: 2px inset #dfdfdf;
  padding: 12px;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar ul { list-style: none; }

.sidebar li {
  margin: 8px 0;
  padding: 4px 8px;
  cursor: pointer;
}

.sidebar li:hover { background: #000080; color: white; }

.file-view {
  flex: 1;
  padding: 40px 30px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 40px 30px;
  align-content: start;
}

.icon {
  text-align: center;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 4px;
  transition: all 0.1s;
}

.icon:hover {
  background: rgba(0,0,0,0.05);
  transform: scale(1.03);
}

.icon:hover span {
  text-decoration: underline;
  color: #0000ff;
}

.icon i {
  font-size: 56px;
  color: #000080;
  display: block;
  margin: 0 auto 8px;
}

.icon span {
  font-size: 13px;
  line-height: 1.3;
  display: block;
  max-width: 90px;
  margin: 0 auto;
  transition: all 0.1s;
}

.status-bar {
  background: #c0c0c0;
  border-top: 2px solid #fff;
  padding: 6px 12px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
}

/* Modal (notepads) */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

.modal.active {
  pointer-events: all;
}

.modal-content {
  background: #c0c0c0;
  border: 4px solid #dfdfdf;
  border-right-color: #000;
  border-bottom-color: #000;
  box-shadow: 8px 8px 0 #000;
  width: 85vw;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  position: absolute;
  z-index: 10001;
}

.modal-title-bar {
  background: linear-gradient(to right, #000080, #1084d0);
  color: white;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  cursor: move;
  user-select: none;
}

.close-btn { cursor: pointer; font-size: 20px; }

.modal-body {
  padding: 24px;
  background: #fff;
  font-size: 15px;
  line-height: 1.5;
}

.hobby-link {
  color: #0000ff;
  text-decoration: underline;
  cursor: pointer;
}

.hobby-link:hover { color: #0000aa; }