/* General Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
  }
  
  /* Loading Screen */
  #loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    background: #000;
  }
  
  .load-bar {
    width: 300px;
    height: 20px;
    background: #444;
    margin-top: 10px;
    border-radius: 5px;
    overflow: hidden;
  }
  
  .progress {
    height: 100%;
    width: 0;
    background: #8b0000;
    transition: width 0.2s ease-in-out;
  }
  
  /* Desktop */
  #desktop {
    height: 100vh;
    width: 100vw;
    position: relative;
  }
  
  #desktop-background {
    position: absolute;
    height: 100%;
    width: 100%;
    background: url('../images/wallpaper.jpg') center;
    z-index: -1;
  }
  
/* Taskbar */
#taskbar {
    position: absolute;
    bottom: 0;
    height: 40px;
    width: 100%;
    background: #33333359;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
  }
  
  /* Clock */
  #clock {
    color: white;
    max-width: 150px; /* Set a maximum width for the clock */
    text-align: right; /* Align the clock to the right */
    white-space: nowrap; /* Prevent clock from wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis if the time is too long */
  }
  
  
  #start-button {
    background: #444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
  }
  
  #clock {
    color: white;
  }
  
/* Desktop Icons */
#icons {
  position: absolute;
  top: 10%;
  left: 5%;
  display: grid;
  grid-auto-flow: column; /* Flow icons by columns */
  grid-template-rows: repeat(4, auto); /* Limit to 4 icons per column */
  gap: 20px; /* Spacing between items */
  max-height: 80vh; /* Prevent overflow beyond screen height */
  overflow-y: auto; /* Allow scrolling if content exceeds screen height */
}

  
  .icon {
    text-align: center;
    cursor: pointer;
  }
  
  .icon img {
    width: 64px;
    height: 64px;
  }
  
  .icon p {
    margin: 5px 0 0;
    font-size: 14px;
    color: white;
  }
  
  /* Window */
  .window {
    position: absolute;
    width: 300px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #333;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  }
  
  
  .window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #444;
    color: #fff;
    padding: 5px 10px;
    cursor: move;
  }
  
  .window-header button {
    background: #f44336;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
  }
  
  .window-content {
    padding: 10px;
  }

  /* Calculator Window Styles */
.calc-display {
    width: 100%;
    height: 50px;
    background: #222;
    color: white;
    text-align: right;
    font-size: 2rem;
    padding: 10px;
    box-sizing: border-box;
    margin-bottom: 10px;
    border-radius: 5px;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-buttons button {
    background: #333;
    color: white;
    font-size: 1.5rem;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.calc-buttons button:hover {
    background: #555;
}

.equal {
    background: #4caf50;
}

.equal:hover {
    background: #45a049;
}

/* Command Prompt Window Styles */
#cmd {
    width: 500px;
    height: 350px;
    background: #1e1e1e;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 2px solid #333;
    overflow: hidden;
}

#cmd-output {
    height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

#cmd-input {
    width: 100%;
    padding: 10px;
    background: #333;
    color: #ffffff;
    border: none;
    font-size: 16px;
    border-radius: 5px;
    outline: none;
    box-sizing: border-box;
    transition: background 0.3s ease;
}

/* When the user focuses on the input */
#cmd-input:focus {
    background: #444;
}

#cmd-input::placeholder {
    color: #555;
}

/* Command Output Styles */
#cmd-output p {
    margin: 5px 0;
}

/* Styling links within the command output */
#cmd-output a {
    color: #ffffff;
    text-decoration: none;
}

#cmd-output a:hover {
    text-decoration: underline;
}

/* Scrollbar customization */
#cmd-output::-webkit-scrollbar {
    width: 8px;
}

#cmd-output::-webkit-scrollbar-thumb {
    background-color: #ffffff;
    border-radius: 5px;
}

#cmd-output::-webkit-scrollbar-track {
    background: #333;
}

/* Typing Effect for Command Output */
#cmd-output p {
    animation: typing 1s steps(30, end) 1;
}

/* Keyframe for typing effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Music Player Styles */
#music-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: rgba(20, 20, 20, 0.9);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#player-display {
  width: 100%;
  background: linear-gradient(45deg, #1e1e1e, #444);
  color: #fff;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

#audio {
  width: 100%;
  background: #333;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

#audio::-webkit-media-controls {
  background: #444;
  color: white;
  border-radius: 8px;
}

#playlist {
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  background: #1c1c1c;
  border-radius: 8px;
  padding: 10px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

#playlist ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#playlist li {
  padding: 10px 15px;
  background: linear-gradient(45deg, #222, #333);
  color: white;
  border-radius: 8px;
  margin-bottom: 8px;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

#playlist li:hover {
  background: linear-gradient(45deg, #444, #555);
  transform: scale(1.03);
}

#playlist li:active {
  background: linear-gradient(45deg, #666, #777);
  transform: scale(1);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 5px;
}

::-webkit-scrollbar-track {
  background: #333;
}

#playlist {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

#track-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  width: 100%;
  max-width: 300px;
}

#track-list li {
  cursor: pointer;
  padding: 8px 10px;
  background: #464343;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 5px;
  transition: background 0.3s, color 0.3s;
}

#track-list li:hover {
  background: #333131;
  color: #ccc;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 300px;
}

.navigation-buttons button {
  padding: 8px 15px;
  cursor: pointer;
  border: 1px solid #ccc;
  background: transparent;
  color: #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.navigation-buttons button:hover {
  background: #464141;
}

.navigation-buttons button:disabled {
  background: transparent;
  color: #999;
  cursor: not-allowed;
}

.password-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Password Generator Styles */
.password-generator {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
}

.password-display {
    display: flex;
    gap: 10px;
    width: 100%;
}

#generated-password {
    flex: 1;
    padding: 12px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    box-sizing: border-box;
}

#copy-password {
    padding: 10px 15px;
    background: #444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

#copy-password:hover {
    background: #555;
}

.password-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.length-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.length-control label {
    font-size: 14px;
    color: #ccc;
}

#password-length {
    width: 100%;
    height: 6px;
    background: #444;
    border-radius: 3px;
    outline: none;
}

#password-length::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #5e5e5e;
    border-radius: 50%;
    cursor: pointer;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.setting-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ccc;
    cursor: pointer;
}

.setting-option input {
    margin: 0;
    cursor: pointer;
}

.generate-btn {
    padding: 12px;
    background: #444444;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.generate-btn:hover {
    background: #6d6c6c;
}

.copied-feedback {
    animation: fadeOut 1.5s forwards;
    background: #333232 !important;
}

@keyframes fadeOut {
    to {
        background: #444;
    }
}