@media (max-width: 768px) {
  .crt-main {
    width: 100vw;       /* Make the desktop fill the phone's width */
    height: auto;       /* Let the height be set by the aspect ratio */
    aspect-ratio: 4 / 3; /* Keep your 4:3 ratio */

    /* This centers your 4:3 desktop vertically */
    margin: auto 0; 
  }
}
@media (max-width: 768px) {
  .start-item {
    padding: 8px 16px;
    font-size: 14px;
  }
  .window-body {
    padding: 8px;
    font-size: 14px;
  }
  button {
    padding: 6px 12px;
    font-size: 14px;
  }
}

@font-face {
font-family: 'DOSVGA';
src: url('assets/fonts/perfectdos437.ttf') format('truetype');
}
@keyframes minimizeAnim {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.1) translateY(400px); /* or 100% height */
  }
}

.window.minimizing {
  animation: minimizeAnim 0.3s ease-out forwards;
  pointer-events: none;
}
*
{
  font-family: 'DOSVGA', monospace;
  box-sizing: border-box;
}
body {
  background-color: black;      
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;      
  align-items: stretch;         
  overflow: hidden;
}
.crt-main,
button,
.taskbar-button,
.start-menu-button,
.desktop-icon,
.title-bar-controls button {
  cursor: url('assets/images/Cursor.ico') 0 0, auto !important;
}

.crt-main {
  aspect-ratio: 4 / 3;          
  height: 100vh;                
  background-color: #008080;    
  overflow: hidden;
  cursor: url('assets/images/Cursor.ico') 0 0 , auto;
  display: flex;
  flex-direction: column;
  position: relative;

}
.taskbar-clock {
  background: silver;
  border: 2px inset #aaa;
  padding: 2px 8px;
  font-size: 13px;
}
  .taskbar {
    display: flex;
    align-items: center;
    background: silver;
    border-top: 2px solid white;
    border-bottom: 2px solid #808080;
    padding: 2px 4px;
    height: 30px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: space-between;
  }

  .start-menu-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 2px;
    background: silver;
    font-weight: bold;
    border-top: 2px solid #ffffff;  
    border-left: 2px solid #ffffff;  
    border-bottom: 2px solid #000000; 
    border-right: 2px solid #000000; 
  }

  .taskbar-windows {
    display: flex;
    gap: 4px;
    flex: 1;
    margin-left: 8px;
    overflow: hidden;
  }

  .window-button {
    font-size: 12px;
    background: silver;
    border: 2px outset white;
    padding: 2px 8px;
    cursor: pointer;
  }
.taskbar-clock {
  background: silver;
  border: 2px inset #aaa;
  padding: 2px 8px;
  font-size: 13px;
  flex-shrink: 0; /* prevents shrinking */
  white-space: nowrap;
}
#start
{
height: 15px;
width: 20px;
}
b{
  font-size: 13px;
  padding-right: 2px;
}
.desktop-icon {
  position: absolute;
  top: 40px;
  left: 20px;
  width: 60px;
  text-align: center;
  color: white;
  font-size: 12px;
  cursor: pointer;
}

.desktop-icon img {
  width: 32px;
  height: 32px;
}

.icon-label {
  margin-top: 4px;
  font-family: 'DOSVGA', monospace;
  color: white;
  text-shadow: 1px 1px black;
}

.window {
  position: absolute;
  top: 100px;
  left: 100px;
  width: 300px;
  display: none;
  z-index: 100;
  resize: both;
  overflow: auto; 
}
.taskbar-button {
  font-size: 13px;
  height: 20px;
  min-width: 80px;
  max-width: 150px;
  flex: 1 1 auto; /* makes them grow/shrink */
  padding: 2px 6px;
  background: silver;

  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #000000;
  border-right: 2px solid #000000;

  display: flex;
  align-items: center;
  justify-content: left;

  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.taskbar-button.active {
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  border-bottom: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  background-color: #c0c0c0;
}
.taskbar-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}
.taskbar-button span {
  font-size: 13px;
  font-weight: bold;
}
.project_icon
{
  height: 70px;
  width: 70px;
}
.window.minimize-step1 {
  transition: top 0.25s ease-out;
}

.window.minimize-step2 {
  transition: transform 0.35s ease-in;
  transform-origin: center center;
  transform: scale(0.3);
}
.start-menu {
  position: absolute;
  bottom: 30px;
  left: 0;
  display: flex;
  width: 190px;
  height: 250px;
  background: silver;
  border-top: 2px solid white;
  border-left: 2px solid white;
  border-bottom: 2px solid black;
  border-right: 2px solid black;
  z-index: 9999;
  box-sizing: border-box;
  font-size: 13px;
  font-family: 'DOSVGA', monospace;
}

.start-left-bar {
  writing-mode: vertical-rl;
  background: #808080;
  color: white;
  padding: 6px 4px;
  font-weight: bold;
  text-align: center;
  border-right: 2px solid black;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.start-menu-main {
  width: 100%;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  background: silver;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  cursor: default;
  color: black;
  user-select: none;
}

.start-item:hover {
  background: navy;
  color: white;
}

.start-item img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.start-divider {
  margin: 4px 10px;
  border: none;
  border-top: 1px solid gray;
  border-bottom: 1px solid white;
}
/* Submenu support */
.start-item.has-submenu {
  position: relative;
}

.start-item.has-submenu:hover .submenu {
  display: block;
}

.submenu {
  position: absolute;
  left: 100%;
  top: 0;
  display: none;
  background: silver;
  border-top: 2px solid white;
  border-left: 2px solid white;
  border-bottom: 2px solid black;
  border-right: 2px solid black;
  z-index: 10000;
  width: 160px;
}

.submenu .start-item {
  white-space: nowrap;
}
#paint-canvas {
  background: white;
  cursor: crosshair;
  image-rendering: pixelated;
  width: 100%;
  height: 100%;
  display: block;
} 
.hidden {
  display: none !important;
}
.canvas-wrapper {
  flex: 1;
  position: relative;
}
#desktop-area {
  flex-grow: 1;
  position: relative;
}
.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  /* This is the key change */
  height: calc(100% - 30px) !important; 
  resize: none;
}
#snake-canvas {
  background-color: #c7d99f;
  border: 2px solid #3a3f34;
  image-rendering: pixelated;
}

.snake-ui-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  color: #c7d99f;
  font-family: 'DOSVGA', monospace;
  font-size: 14px;
}

#snake-score {
  font-weight: bold;
}

.snake-ui-panel button {
  font-family: 'DOSVGA', monospace;
}

/* --- DOS Prompt Styles --- */
/* --- DOS Prompt Styles (Corrected) --- */
#dos-window {
  display: flex;
  flex-direction: column;
}
/* --- DOS Prompt Styles (Final) --- */
#dos-body {
    background: black;
    color: #c0c0c0;
    font-family: 'DOSVGA', monospace;
    padding: 4px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important: Prevents this element from showing a scrollbar */
}

#dos-output {
    flex: 1; /* This makes the text area expand */
    min-height: 0; /* A crucial fix for flexbox bugs */
    overflow-y: auto; /* This allows ONLY the text area to scroll when needed */
    white-space: pre-wrap;
    font-size: 14px;
}

.dos-input-line {
    display: flex;
    align-items: center;
}

#dos-input {
    background: black;
    border: none;
    color: #c0c0c0;
    font-family: 'DOSVGA', monospace;
    flex-grow: 1;
    outline: none;
    padding-left: 5px;
    font-size: 14px;
}
/* --- Clippy Styles --- */
#clippy-container {
  position: absolute;
  bottom: 50px;
  right: 20px;
  z-index: 99999;
}

#clippy-img {
  width: 100px;
}

.speech-bubble {
  position: absolute;
  bottom: 100%;
  right: 50%;
  background: #ffffe1;
  border: 1px solid black;
  padding: 10px;
  width: 200px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.speech-bubble p {
  margin: 0 0 10px;
}

.clippy-buttons {
  text-align: right;
}
#wallpapers-body {
    padding: 10px;
}

.wallpaper-selection {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.wallpaper-option {
    text-align: center;
    cursor: pointer;
}

.wallpaper-option img {
    width: 80px;
    height: 60px;
    border: 2px solid #fff;
    outline: 1px solid #000;
}

.wallpaper-option span {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}
#clippy-text{
  min-height: 40px;
}
/* --- Screensaver Styles --- */
#screensaver {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 100000;
  cursor: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

#screensaver-video {
  background: black;
  object-fit: contain;
}
#suspend-screen {
  position: fixed; /* cover the entire viewport */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  opacity: 0.95;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'DOSVGA', monospace;
  font-size: 18px;
  z-index: 100000; /* ensure it's above all other elements */
}

.hidden {
  display: none !important;
}
#rck-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100000;
}

#rck-overlay.hidden {
  display: none !important;
}

#rck-video {
  border: 5px solid white;
  background: black;
}
/* Recycle Bin Styling */
#recycle-window {
  min-height: 220px; /* enough to fit header, content and status */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#recycle-body {
  font-family: 'DOSVGA', monospace;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden; /* prevent scrolling */
}

.menu-bar {
  display: flex;
  background: #c0c0c0;
  border-bottom: 2px solid #000;
  padding: 1px 4px;
  gap: 10px;
  font-size: 10px;
  height: 20px;
  box-sizing: border-box;
  flex-shrink: 0; /* prevents shrinking */
}

.recycle-header {
  display: grid;
  grid-template-columns: 2fr 3fr 2fr 2fr 1fr;
  background: #c0c0c0;
  border-bottom: 1px solid #000;
  font-size: 12px;
  padding: 2px;
  gap: 2px;
  height: 25px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.recycle-header div {
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #000;
  border-right: 2px solid #000;
  text-align: left;
  user-select: none;
  font-size: 12px;
  padding: 2px;
}

.recycle-content {
  flex: 1;
  overflow: hidden; /* prevent scrolling */
  display: flex;
  flex-direction: column;
}

.recycle-item {
  display: grid;
  grid-template-columns: 2fr 3fr 2fr 2fr 1fr;
  padding: 6px;
  align-items: center;
  cursor: pointer;
}

.recycle-item:hover {
  background-color: #000080;
  color: #fff;
}

.recycle-item img {
  vertical-align:auto;
  margin-right: 5px;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  background: #c0c0c0;
  border-top: 2px solid #000;
  padding: 2px 5px;
  font-size: 12px;
  height: 20px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.status-pane {
  color: #000;
}

.recycle-header {
  display: grid;
  grid-template-columns: 2fr 3fr 2fr 2fr 1fr;
  background: #c0c0c0;
  border-bottom: 1px solid #000;
  font-size: 12px;
  padding: 2px;
  gap: 2px;
}

.recycle-header div {
  /* padding: 1px;*/
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #000;
  border-right: 2px solid #000;
  text-align: left;
  user-select: none;
  font-size: 12px;
}
.hidden{
  display: none;
}
.dialog {
  position: absolute;
  top: 150px;
  left: 150px;
  width: 300px;
  background: silver;
  border: 2px solid black;
  font-family: 'DOSVGA', monospace;
  z-index: 200;
}

.dialog .title-bar {
  display: flex;
  justify-content: space-between;
  background: navy;
  color: white;
  padding: 4px;
}

.dialog .title-bar-controls button {
  width: 20px;
  height: 20px;
  background: silver;
  border: 2px outset white;
}

.dialog .window-body {
  padding: 10px;
}

.dialog button {
  padding: 4px 8px;
  background: silver;
  border: 2px outset white;
  cursor: pointer;
  font-family: 'DOSVGA', monospace;
}

.dialog button:hover {
  background: #000080;
  color: white;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .start-menu {
    bottom: auto !important;
    top: 40px !important;
    left: 10px !important;
    width: calc(100% - 20px) !important;
    max-width: 250px !important;
    box-sizing: border-box;
  }
}
/* in style.css, you can add this at the end */

#shutdown-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  color: #c0c0c0;
  z-index: 200000; /* Ensure it's on top of everything */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: 'DOSVGA', monospace;
}

.shutdown-content h1 {
  color: white;
  font-size: 3rem;
  margin: 10px 0;
  font-weight: normal;
}

.shutdown-content p {
  color: orange;
  font-size: 1.2rem;
  letter-spacing: 1px;
}
.shutdown-content img {
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
}
.window-body {
  /* This is the key fix: It adds a vertical scrollbar ONLY when needed. */
  overflow-y: auto;
}
/* --- Improved Window Content Styling --- */

/* Style for each project or certificate entry */
.window-body .content-item {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #808080; /* Separator line */
}
.window-body .content-item:last-child {
  border-bottom: none; /* No line after the last item */
  margin-bottom: 0;
}
/* Smaller, more thematic headings */
.window-body h3, .window-body h4 {
  font-size: 16px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 6px;
}

/* Consistent paragraph styling */
.window-body p {
  margin-top: 0;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Classic blue, underlined links */
.window-body a {
  color: #0000FF;
  text-decoration: underline;
}

/* Ensure lists have proper spacing */
.window-body ul {
  margin: 0;
  padding-left: 20px;
}

/* Final fix for images: ensure they never exceed the container width */
.window-body img {
  width: 500px;      /* Set a sensible ideal width for the image */
  max-width: 100%;   /* IMPORTANT: This ensures it shrinks to fit smaller windows */
  height: auto;      /* Maintain aspect ratio */
  display: block;
  margin: 15px auto; /* Center the image with some vertical spacing */
}
/* Specific size for the Certificates window on initial open */
#certificates-window {
  width: 450px;
  height: 400px;
}
.title-bar {
  flex-shrink: 0;              /* Prevents shrinking */
  position: sticky;            /* Makes it stick */
  top: 0;                      /* Sticks to the top of window */
  z-index: 10;                 /* Keeps it above content */
}
#projects-window {
  width: 450px;
  height: 400px;
}
