* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --xp-window-bg: #ece9d8;
  --desktop-bg: radial-gradient(circle at center, #f5f7fa 0%, #e4e8ec 100%);
  --logo-color: #4a5568;
}

/* Off-White Background, tried something like the background of WinXP File Explorer */
.desktop {
  position: relative;
  width: 100vw;
  height: 100dvh;
  background: radial-gradient(circle at center, #f5f7fa 0%, #e4e8ec 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background: var(--desktop-bg);
}

/* CSS for logo text  */
.logo-txt {
  position: absolute;
  top: 20px;
  left: 24px;
  font-family: 'Courier New', monospace;
  color: #4a5568;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 0.8;
  color: var(--logo-color);
}

/* CSS for Search Bar Layout */
.search-container {
  margin-top: 19vh;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 30;
}

.search-form {
  width: 45vw;
  min-width: 360px;
  max-width: 650px;
}

.search-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1.5px solid #7f9db9; /* Almost invisible light blue border for the search bar, I like small detailing! */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-wrapper:focus-within {
  box-shadow: 0 4px 14px rgba(57, 149, 255, 0.374);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  color: #111;
}

/* Windows XP Styled Button here! w/ light orange shade on hover */
.xp-btn {
  background: linear-gradient(to bottom, #ffffff 0%, #ece9d8 100%);
  border: 1px solid #7f9db9;
  border-radius: 3px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  color: #000;
  box-shadow: inset 0 0 2px #fff;
}

.xp-btn:hover {
  background: linear-gradient(to bottom, #fff8e5 0%, #fce2a6 100%);
  border-color: #e3a212;
}

.xp-btn:active {
  background: #e5e5e5;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.3);
}

/* Windows XP Notepad Window ⬇ */ /* Few of these are used for Bookmarks Manager Window too! */
.xp-title-icon {
  width: 16px;
  height: 16px;
}

.xp-menubar {
  background-color: var(--xp-window-bg);
  border-bottom: 1px solid #d0d0d0;
  padding: 3px 6px;
  font-size: 11px;
  display: flex;
  gap: 12px;
  color: #000;
}

.menu-item {
  cursor: default;
}

.menu-item:hover {
  background-color: #316ac5;
  color: #ffffff;
}

.notepad-body {
  flex: 1;
  padding: 2px;
  background: #ffffff;
}

#xp-notepad {
  user-select: text;
  width: 100%;
  height: 100%;
  border: 2px solid #7f9db9;
  outline: none;
  resize: none;
  padding: 6px;
  font-family: 'Lucida Console', 'Courier New', monospace;
  font-size: 13px;
  color: #000;
  line-height: 1.4;
}

.xp-statusbar {
  background-color: var(--xp-window-bg);
  border-top: 1px solid #d0d0d0;
  padding: 2px 8px;
  font-size: 11px;
  color: #555;
  display: flex;
  justify-content: space-between;
}

.hidden {
  display: none !important;
}

/* Window Frame */
.xp-window {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 480px;
  height: 320px;
  background-color: #ece9d8;
  border: 3px solid #0055ea;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
}

/* Windows XP Blue Titlebar */
.xp-titlebar {
  background: linear-gradient(
    to bottom,
    #0058ee 0%,
    #3593ff 4%,
    #288efb 6%,
    #0055ea 10%,
    #0055ea 90%,
    #0040ad 95%,
    #002686 100%
  );
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.xp-titlebar-text {
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  text-shadow: 1px 1px 1px #0f256e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.xp-titlebar-controls {
  display: flex;
  gap: 2px;
}

.xp-control-btn {
  width: 21px;
  height: 21px;
  font-family: Arial;
  font-size: 11px;
  font-weight: bold;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, #3c93e7 0%, #0058ee 100%);
  box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.8);
  padding: 0;
  line-height: 1;
  cursor: pointer;
}

.xp-control-btn.xp-close {
  background: linear-gradient(to bottom, #f78061 0%, #ae1600 100%);
}

.xp-control-btn:disabled {
  opacity: 0.85;
  cursor: default;
}

/* Added styles for desktop icon below */

.desktop-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 75px;
  padding: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 3px;
}

/* Windows XP styled desktop icon */
.desktop-icon:hover {
  background-color: rgba(49, 106, 197, 0.15);
  border-color: rgba(49, 106, 197, 0.3);
}

.desktop-icon:active {
  background-color: rgba(49, 106, 197, 0.3);
  border-color: rgba(49, 106, 197, 0.6);
}

#notepad-icon {
  bottom: 24px;
  left: 24px;
}

#bookmarks-manager-icon {
  bottom: 24px;
  left: 110px;
}

#settings-icon {
  bottom: 24px;
  left: 195px;
}

.bookmarks-bg {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  z-index: 10;
}

.bookmarks-bg .bookmark-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border: 1.5px solid rgba(49, 106, 197, 0.3);
  border-radius: 15px;
  cursor: pointer;
}

.bookmark-label {
  padding-top: 2px;
  color:#ffffff;
  font-size: 14px;
  font-family: 'Tahoma';
  text-shadow: 1px 1px 2px #000, 0 0 4px #000;
}

.bookmark-img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.bookmarks-bg .bookmark-card:hover {
  background-color: rgba(49, 106, 197, 0.15);
}

.add-bookmarks {
  padding: 10px;
  background-color: var(--xp-window-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bm-form {
  display: flex;
  gap: 6px;
}

.bm-form input {
  flex: 1;
  padding: 4px;
  border: 1px solid #7f9db9;
  outline: none; /*this removes the black borders from the input fields*/
}

.bm-list {
  flex: 1;
  background: #ffffff;
  border: 2px solid #7f9db9;
}

.bm-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 12px;
  font-family: 'Tahoma';
}

.bm-delete-btn {
  background: #e81123;
  color: white;
  border: none; /* removes the ugly border from the buttons just like removing the outline on the input fields */
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
  border-radius: 3px;
}

.icon-label {
  color: #ffffff;
  font-size: 11px;
  font-family: 'Tahoma';
  text-shadow: 1px 1px 2px #000000, 0 0 4px #000000;
}

.icon-img {
  height: 32px;
  width: 32x;
  margin-bottom: 4px;
}

.no-bookmarks-text {
  margin-top: 25px; /* I gave a little spacing for the note from the top so that it doesn't seem to merge with the searchbar*/
}

.settings-body {
  padding: 12px;
  background-color: var(--xp-window-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-label {
  font-family: 'Tahoma';
  font-size: 11px;
  color: #000;
}

.theme-options-div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  overflow-y: auto;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid #7f9db9;
  background-color: #ffffff;
  border-radius: 3px;
  cursor: pointer;
  font-family: 'Tahoma';
  font-size: 11px;
}

.theme-option:hover {
  background: #e5f1fb;
  border-color: #316ac5;
}

.theme-option.active {
  border: 2px solid #0055ea;
  background: #cce4f7;
  font-weight: bold;
}

.theme-preview {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  border: 1px solid #999;
}

.time-widget {
  position: absolute;
  bottom: 0;
  right: 0;
  border-top-left-radius: 6px;
  border-top: 1px solid #002e99;
  border-left: 1px solid #002e99;
  padding: 4px 12px;
  font-family: 'Tahoma';
  font-size: 11px;
}

.time-widget.white { /* This would be applied from JS when a dark coloured theme is selected by the user and the time-widget color changes to white instead of the usual black enabling people to view it easily*/
  border-top: 1px solid rgb(212, 212, 212);
  border-left: 1px solid rgb(212, 212, 212);
  color: white;
}

.info-widget { /* Wanted it to look like a pop-up from the side so, right position is zero and added the borders on only three sizes*/
  position: absolute;
  right: 0;
  bottom: 36px;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  border-top: 2px solid #002686;
  border-left: 2px solid #002686;
  border-bottom: 2px solid #002686;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 10px;
  padding-right: 4px;
  background-color: #efeee5; /* I randomly got this color on the color picker and it suits absolutely well just like the dialog of windows XP ig */
  width: 300px;
}

#info {
  font-size: 12px;
  font-family: 'Verdana'; /*A perfect font for this dialog!!*/
}