/********** VARIABLES & RESET **********/
:root {
  --color-white: #fff;
  --color-white-100: rgba(255, 255, 255, 0.1);
  --color-white-200: rgba(255, 255, 255, 0.2);
  --color-white-400: rgba(255, 255, 255, 0.4);
  --color-white-800: rgba(255, 255, 255, 0.8);
  --color-white-900: rgba(255, 255, 255, 0.9);
  --color-black: #1e1e1e;
  --color-black-100: rgba(0, 0, 0, 0.1);
  --color-black-500: rgba(0, 0, 0, 0.5);
  --color-blue-800: #007ff7;
  --app-color-white: rgb(252, 255, 251);
  --color-red: rgba(255, 2, 2, 0.788);
  --color-green: #11dd4e;
}

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

body {
  height: 100vh;
  width: 100vw;
  user-select: none;
  font-family: "Lexend", sans-serif;
  background: url("../background/iridescence.jpg") center/cover no-repeat;
  overflow: hidden;
  position: relative;
}

/********** TOP NAVBAR **********/
.navbar {
  width: 100%;
  padding: 4px 15px;
  position: fixed;
  top: 0;
  left: 0;
  color: var(--color-white);
  background: linear-gradient(to right, #6e1438, #270598, #e54c2d);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10000;
  transition: transform 0.3s ease, opacity 0.3s ease;
  font-size: 14px;
}

.navbar ul { display: flex; align-items: center; gap: 15px; }
.navbar li { cursor: pointer; transition: 0.2s; }
.navbar li:hover { opacity: 0.7; }

/********** DOCK **********/
.dock {
  display: flex;
  align-items: center;
  position: fixed;
  bottom: 20px;
  left: 50%;
  height: 65px;
  padding: 0 10px;
  transform: translateX(-50%);
  backdrop-filter: blur(20px);
  background: var(--color-white-100);
  border: 1px solid var(--color-white-200);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dock .icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 5px;
}

.dock .icon img {
  width: 45px;
  transition: width 0.2s, transform 0.2s;
}

.dock .icon:hover img {
  width: 65px;
  transform: translateY(-15px);
}

.dock .point {
  width: 4px;
  height: 4px;
  background: var(--color-white);
  border-radius: 50%;
  margin-top: 2px;
  display: none; /* Controlled by JS */
}

/********** WINDOW ARCHITECTURE **********/
.window, .calculator {
  display: none;
  position: absolute;
  background: var(--app-color-white);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  z-index: 100;
}

/* Drag Handles */
.window__taskbar, .calculator__top--taskabr {
  height: 38px;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.05);
  cursor: grab;
}
.window__taskbar:active, .calculator__top--taskabr:active { cursor: grabbing; }

.window__taskbar--actions {
  display: flex;
  gap: 8px;
}

.window__taskbar--actions button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.btn-close { background: #ff5f56; }
.btn-min { background: #ffbd2e; }
.btn-full { background: #27c93f; }

/********** CALCULATOR SPECIFIC **********/
.calculator {
  width: 280px;
  height: 400px;
  background: #1e1e1e;
}

.calculator__top--output {
  width: 100%;
  height: 80px;
  background: transparent;
  color: white;
  text-align: right;
  padding: 20px;
  font-size: 2.5rem;
  border: none;
}

.calculator .input {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(100% - 118px);
}

.calculator .button {
  border: 0.5px solid #333;
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.calculator .button:hover { background: #444; }
.calculator .operator { background: #fe9505; }
.calculator .operator:hover { background: #ffb142; }

/********** TERMINAL SPECIFIC **********/
.terminal_content {
  width: 100%;
  height: calc(100% - 38px);
  background: rgba(10, 10, 25, 0.9);
  color: #00ff41;
  padding: 15px;
  font-family: 'Courier New', monospace;
  overflow-y: auto;
}

/********** NOTES SPECIFIC **********/
.note .content { display: flex; height: calc(100% - 38px); }

.content__sidebar {
  width: 30%;
  background: rgba(0, 0, 0, 0.05);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  padding: 10px;
}

.content__typing {
  flex: 1;
  padding: 15px;
  border: none;
  outline: none;
  resize: none;
}

/********** FULLSCREEN & HIDDEN STATES **********/
.fullscreen-mode {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  z-index: 99999 !important;
}

/* Logic to hide UI when fullscreen active */
body.app-fullscreen .navbar { transform: translateY(-100%); }
body.app-fullscreen .dock { transform: translateX(-50%) translateY(100px); }

/********** SPOTLIGHT SEARCH **********/
.spotlight_serach {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  border-radius: 10px;
  display: none; /* Flex when active */
  align-items: center;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 11000;
}

.spotlight_serach input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 18px;
  margin-left: 10px;
}

/********** SCROLLBARS **********/
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.3); border-radius: 10px; }
