:root {
  --win-bg: #008080;
  --win-gray: #c0c0c0;
  --win-dark: #808080;
  --win-light: #ffffff;
  --win-shadow: #404040;
  --win-blue: #000080;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: rgb(162, 133, 162);
}

.icon {
  padding: 15px;
  width: 72px;
  text-align: center;
  font-size: 12px;
  color: white;
  cursor: default;
  user-select: none;
}

.icon:hover {
    cursor: pointer;
}

.icon img {
  display: block;
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.icon-label {
    font-size: 13px;
    padding-left: 5px;
}


#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 37px;
  width: 100%;
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  box-shadow: inset 0 1px var(--win-shadow);
  display: flex;
  align-items: center;
  padding: 2px;
  z-index: 999;
}

/* Start button */
#start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  margin-left: 4px;
  margin-bottom: 2px;
  background: var(--win-gray);
  border: 2px solid var(--win-dark);
  box-shadow:
    inset -1px -1px var(--win-shadow),
    inset 1px 1px var(--win-light);
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
}

#start-btn img {
  width: 16px;
  image-rendering: pixelated;
}

/* App buttons area */
#taskbar-apps {
  display: flex;
  margin-left: 6px;
  gap: 4px;
}

#desktop {
  padding-bottom: 32px;
}

.window {
    display: none; /* Hidden by default */
    position: absolute;
    top: 50px;
    left: 50px;
    
    /* Make it bigger */
    width: 400px;
    height: 300px;
    
    background: var(--win-gray);
    padding: 3px;
    z-index: 10;

    /* Classic 95 3D Outset Border */
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
    box-shadow: 1px 1px 0 0 black;
}

.title-bar {
    display: flex; /* Aligns text left and X right */
    justify-content: space-between;
    align-items: center;
    padding: 2px 4px;
    background: var(--win-dark); /* Default inactive color */
    color: white;
    font-family: 'Pixelated MS Sans Serif', Arial, sans-serif;
    font-size: 11px;
    height: 18px;
}

.close-btn {
    width: 16px;
    height: 14px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--win-gray);
    border: 1px solid;
    border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
    cursor: pointer;
}

.window-content {
    /* display: flex; */
    background: whitesmoke;
    margin-top: 2px;
    padding: 10px;
    /* Sunken 3D effect */
    border-top: 2px solid var(--win-dark);
    border-left: 2px solid var(--win-dark);
    border-right: 2px solid var(--win-light);
    border-bottom: 2px solid var(--win-light);
    
    /* This makes the white area fill the window */
    height: calc(100% - 25px); 
    overflow: auto;
}

.window-content img {
  size: 2px;
}

/* Active (focused) window */
.window.active .title-bar {
    background: var(--win-blue);
}

/* Inactive window */
.window:not(.active) .title-bar {
  background: var(--win-dark);
  color: #e0e0e0;
}

.window.opening {
  animation: openWin 0.08s steps(2);
}

@keyframes openWin {
  from {
    transform: scale(0.96);
  }
  to {
    transform: scale(1);
  }
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 20px;
    padding: 10px;
}

.file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: default;
    user-select: none;
}

.file-icon img {
    width: 32px; /* Standard small icon size */
    height: 32px;
    margin-bottom: 5px;
    image-rendering: pixelated; /* Keeps it looking retro */
}

.file-icon span {
    font-size: 11px;
    font-family: 'Pixelated MS Sans Serif', Arial, sans-serif;
    padding: 2px;
    word-break: break-all;
    color: black;
}

/* Classic "Selection" Effect */
.file-icon:active span {
    background-color: var(--win-blue);
    color: white;
    outline: 1px dotted white;
}

.file-icon:hover {
  cursor: pointer;
}

.movie-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: sans-serif;
    font-size: 13px;
}

.movie-list::selection {
  color: rgb(196, 129, 140);
  background-color: aquamarine;
}

.movie-list li {
    padding: 4px 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* .movie-list li:hover {
    background-color: var(--win-blue); 
    color: white;
    cursor: pointer;
} */

a {
  text-decoration: none;
  color: black;
}

a:hover {
  color: purple;
  cursor: pointer;
}

/* This makes the blue highlight stay active */
.icon.selected .icon-label,
.file-icon.selected span {
    background-color: var(--win-blue);
    color: white;
    outline: 1px dotted white; /* That classic retro dotted border */
}

/* Ensure icons look like they are being clicked */
.icon:active img, 
.file-icon:active img {
    filter: brightness(0.7) blue; /* Slight darkening effect when clicking */
}




