body {
  font-family: Tahoma, sans-serif;
  background-color: #f4f4f4;
  color: #333;
  margin: 0;
  padding: 0;
}
header {
  font-family: Tahoma, sans-serif;
  background-color: #333;
  color: #fff;
  padding: 20px;
  text-align: center;
}
main {
  padding: 20px;
}
button {
  font-family: Tahoma, sans-serif;
  padding: 10px 20px;
  background-color: #397ef5;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
}
button:hover {
  filter: brightness(1.1);
}
button:active {
  filter: brightness(1.2);
}

button img {
  height: 1.5em;
  aspect-ratio: 1;
}

/* General Windows XP styling */
body.windows-xp {
  font-family: Tahoma, sans-serif;
  background: url("img/desktop_background.jpg") no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.windows-xp.bright {
  position: relative;
}

body.windows-xp.bright:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% - 4px * 2);
  height: calc(100% - 3em - 4px * 2);
  background-color: rgba(255, 255, 255, 0.5);
  z-index: 1;
  border-radius: 5px;
  border: 4px solid #3a6ea5b2;
}

/* Start bar and taskbar */
.xp-start-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #3a6ea5;
  color: white;
  gap: 2rem;
  height: 3em;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.xp-start-button {
  display: flex;
  align-items: center;
  gap: 0.5em;
  background-color: #4caf50;
  color: white;
  padding: 0px 15px;
  min-width: max-content;
  height: 100%;
  cursor: pointer;
  font-style: italic;
  font-weight: 700;
  font-size: 1.2em;
  width: 5em;
  justify-content: start;
  position: relative;
  z-index: 1;
}

.xp-start-button:after {
  content: "";
  position: absolute;
  right: -0.5em;
  width: 4em;
  aspect-ratio: 1;
  border-radius: 100%;
  z-index: -1;
  background-color: #4caf50;
}

.xp-start-button img {
  width: 20px;
  height: 20px;
}

.xp-taskbar {
  flex-grow: 1;
  text-align: center;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 0.5em;
}

.xp-taskbar-clock {
  font-size: 14px;
  margin-right: 10px;
}

/* Main content styled as a Windows XP program window */
.xp-main {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.xp-window {
  background-color: white;
  border: 2px solid #3a6ea5;
  border-radius: 5px;
  width: 600px;
  height: 400px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.xp-window-header {
  background-color: #3a6ea5;
  color: white;
  padding: 5px;
  border-bottom: 1px solid #87ceeb;
  font-weight: bold;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.xp-window-header span {
  margin-left: 10px;
}

.xp-window-header .xp-window-controls {
  display: flex;
  gap: 5px;
  margin-right: 10px;
}

.xp-window-header .xp-window-controls button {
  width: 20px;
  height: 20px;
  background-color: #3a6ea5;
  border: 1px solid white;
  color: white;
  font-size: 12px;
  cursor: pointer;
}

.xp-window-content {
  flex-grow: 1;
  padding: 10px;
  font-size: 14px;
  text-align: center;
  overflow: auto;
}

/* Footer */
footer {
  z-index: 9999;
}

.xp-footer {
  text-align: center;
  background-color: #3a6ea5;
  color: white;
  padding: 10px;
  width: 100%;
}

/* Desktop grid layout and shortcuts */
.desktop {
  height: calc(100% - 20px);
  width: calc(100% - 20px);
  display: grid;
  grid-template-columns: repeat(auto-fill, 70px);
  grid-auto-rows: 70px;
  grid-template-rows: repeat(auto-fill, 70px);
  grid-auto-columns: 70px;
  gap: 10px;
  padding: 10px;
  margin: auto;
}

.desktop-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.shortcut-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 5px;
}

.shortcut-label {
  font-size: 12px;
  color: #000;
}

/* MARK: XP Button
*/

.xp-start-button {
  --xp-button-color: #9fd57b;
  --xp-button-radius: 0 5rem 5rem 0;
  --xp-button-height: calc(2rem - 10px);

  --xp-color: var(--xp-button-color, #9fd57b);
  --xp-color-dark: color-mix(in srgb, var(--xp-color), black 30%);
  width: calc(fit-content - 8px);
  height: var(--xp-button-height, calc(1.5rem - 8px));
  /* height: calc(2rem - 10px); */
  padding: 0.5rem 1rem;

  border-radius: var(--xp-button-radius, 0.5rem);
  position: relative;
  z-index: 1;

  display: flex;
  justify-content: center;
  align-items: center;

  background: linear-gradient(
    to top,
    var(--xp-color) 0%,
    var(--xp-color-dark) 100%
  );
}

.xp-start-button::before {
  content: "";
  position: absolute;
  inset: -4px;

  border-radius: var(--xp-button-radius, calc(0.5rem + 4px));

  z-index: -1;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  background: linear-gradient(
    to bottom,
    var(--xp-color) 0%,
    var(--xp-color-dark) 100%
  );
  outline: 1px solid black;
}

.xp-start-button::after {
  content: "";
  position: absolute;
  inset: 0px;
  z-index: 1;
  border-radius: var(--xp-button-radius, 0.5rem);
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    var(--xp-color) 0%,
    var(--xp-color-dark) 100%
  );
}

.xp-start-button > * {
  font-size: 1.5em;
  font-weight: 600;
  font-style: italic;
  color: transparent;
  border: none;
  outline: none;
  z-index: 2;
  padding-right: 0.2em;

  background: linear-gradient(
    to top,
    var(--xp-color) 0%,
    var(--xp-color-dark) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  position: relative;
}

.xp-start-button > *::before {
  content: "Start";
  position: absolute;
  inset: 0;
  z-index: 1;

  color: rgba(0, 0, 0, 0.35);
  mix-blend-mode: multiply;
  text-shadow: 0px 0.5px 0px rgba(255, 255, 255, 0.3);
}
.xp-start-button > *::after {
  content: "Start";
  position: absolute;
  inset: 0;
  z-index: 1;
  mix-blend-mode: multiply;
  background: linear-gradient(
    to top,
    var(--xp-color) 0%,
    var(--xp-color-dark) 100%
  );
}

.xp-start-button img,
svg {
  width: 1.5rem;
  height: 1.5rem;
  mix-blend-mode: multiply;
  /* -webkit-background-clip: text;
  background-clip: text; */
  /* background: linear-gradient(
    to top,
    var(--xp-color) 0%,
    var(--xp-color-dark) 100%
    ); */
}

.xp-start-button svg * {
  /* fill: var(--xp-color-dark); */
  mix-blend-mode: multiply;
}
