* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* background: linear-gradient(135deg, #3a7bd5, #00d2ff);
   */
  background-image: url(https://images.pexels.com/photos/36487/above-adventure-aerial-air.jpg) ;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100vh;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
  color: black;

}

/* Desktop Area */
#desktop {
  position: relative;
  height: calc(100vh - 55px);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Desktop Icon */
.icon {
  text-align: center;
  width: 70px;
  cursor: pointer;
  color: white;
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.icon img {
  width: 55px;
  height: 55px;
  margin-bottom: 4px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* Taskbar */
#taskbar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 55px;
  background-color: #c5cacf;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  padding-left: 0;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.4);
  z-index: 99;
  overflow: hidden;
}
#window-search{
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
}

#windowbtn img{
  height: 40px;
  width: 40px;
  cursor: pointer;
  filter: brightness(0.9);
  transition: transform 0.2s ease;
}

#windowbtn:hover{
  filter: brightness(1.3);
}
#searchbar {
  background: white;
  padding: 6px 12px;
  border-radius: 2px;
  border: none; 
  height: 95%;
  width: 50%;
  margin-right: 10px;
}


#searchbar:hover {
  /* box-shadow: ; blue glow on focus */
  border: 2px solid 0 0 4px rgba(0, 123, 255, 0.6);
}

/* DESKTOP ICONS */


/* Icons in taskbar */
#open-windows {
  height: 100%;
  display: flex;
  flex-direction: row;
  gap: 12px; /* spacing between icons */
  align-items: center;
  justify-content: center;
}


#open-windows .icon img {
  height: 30px;
  width: 30px;
  cursor: pointer;
  filter: brightness(0.9);
  transition: transform 0.2s ease;
}

#open-windows .icon:hover img {
  /* background-color: #dadada; */
  filter: brightness(1.1);
}

/* Clock */
#clock {
  color: rgb(0, 0, 0);
  font-size: 15px;
  font-weight: 500;
  padding: 8px;
  width: 120px;
  margin-left: 12px;
}

/* App Window */
#window {
  width: 300px;
  background: white;
  border-radius: 6px;
  position: absolute;
  top: 100px;
  left: 100px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 10;
}

#title-bar {
  background: #e0e0e0;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  font-weight: bold;
  font-size: 1rem;
}

#title-bar button {
  background: #ff5f57;
  border: none;
  color: white;
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 2.5rem;
}

.buttonContainer{
  display: flex;
  gap: 12px;
  font-size: 1.5rem;

}

#title-bar:hover{
  cursor: grab;
}


#window-content {
  padding: 15px;
  font-size: 14px;
}


/* MAIN WINDOW KE LIYE  */

.app-window {
  width: 800px;
  height: 400px;
  position: absolute;
  top: 100px;
  left: 100px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

/* DRAG AREA KE LIYE */
.title-bar {
  background-color: #e0e0e0;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  cursor: move;
  user-select: none;
}

.title-bar:hover{
  cursor:pointer;
}

/* CLOSE BUTTON KE LIYE  */

.title-bar button {
  background-color: transparent;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  color: #333;
}
.title-bar button:hover {
  color: red;
}

/* FOR IFRAME */
.app-window iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
}


/* TASK UTILS/ICONS */

.taskbar-utils-icons{
  display: flex;
  flex-direction:row;
  align-items: center;
  gap: 10px;
}

.task-utils{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 18px;
  height: 100%;
  padding: 12px;
}

.task-utils img{
  height: 22px;
  width: 22px;
  object-fit: contain;
  scale: 0.8;
}

.task-utils img:hover{
  cursor: pointer;
}

.task-utils p {
  font-size: 20px;
  color: #333;
  margin: 0;
  font-weight: 400;
  padding-left: 5px;
}

.contextMenu {
  /* min-width: 180px; */
  width: 300px;
  background-color: #f9f9f9;
  border: 1px solid #515050;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 9999;
  padding: 10px 5px;
  font-family: 'Segoe UI', sans-serif;
}

.contextMenuItem {
  padding: 8px 16px;
  font-size: 14px;
  color: #333;
  /* transition: background 0.2s ease; */
}

.contextMenuItem:hover {
  background-color: #e0e0e0;
  cursor: pointer;
}
.context-item{
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  color: #333;
  transition: background 0.2s ease;
}

.context-item:hover {
  background-color: #e0e0e0;
}


/* DARK AND LIGHT THEME TOGGLE */

.dark-mode {
  background-color: #212121;
  color: white;
}

.dark-mode .app-window {
  background-color: #2c2c2c;
  color: white;
}

.dark-mode #taskbar {
  background-color: #3f3f3f;
  color: white;
}

.dark-mode .taskbar-utils-icons p{
  color: white;
}

.dark-mode #clock{
  color: white;
}

.dark-mode .title-bar {
  background-color: #444;
}

.dark-mode .icon{
  color: #ccc;
}

.dark-mode .contextMenu {
  background-color: #f5f4f4;
  border: 1px solid #444;
  color: white;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  #taskbar {
    flex-direction: column;
    height: auto;
    padding: 10px;
  }
  #searchbar {
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }
  .taskbar-utils-icons {
    flex-wrap: wrap;
    justify-content: center;
  }
  .app-window {
    top: 20px !important;
    left: 10px !important;
    width: 95vw !important;
    height: 60vh !important;
  }
  #open-windows {
    flex-wrap: wrap;
    justify-content: center;
  }
  .icon {
    width: 60px;
    font-size: 13px;
  }
  .icon img {
    width: 45px;
    height: 45px;
  }
}
