body {
  margin: 0;
  padding: 0;
  background-image: url('./wallpaper.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100vh;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: #000;
  user-select: none;
  -webkit-user-select: none;
}

/* Start Menu */
.start-menu {
  position: absolute;
  bottom: 40px;
  left: 0;
  width: 380px;
  height: 480px;
  background: rgba(24, 34, 44, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: none;
  border-radius: 8px 8px 8px 0;
  display: flex;
  z-index: 10000;
  box-shadow: 2px -2px 15px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.8);
  transition: opacity 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: bottom left;
  overflow: hidden;
}

.start-menu.hidden {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
}

.start-left {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 5px;
  box-shadow: inset -1px 0 3px rgba(0,0,0,0.2);
}

.start-item {
  display: flex;
  align-items: center;
  padding: 8px;
  gap: 10px;
  cursor: pointer;
  border-radius: 3px;
  border: 1px solid transparent;
}

.start-item:hover {
  background: #e5f3fb;
  border-color: #d8edf9;
}

.start-item img {
  width: 36px;
  height: 36px;
  border-radius: 3px;
}

.start-item strong {
  display: block;
  font-size: 13px;
  color: #333;
}

.start-item span {
  font-size: 11px;
  color: #777;
}

.start-search {
  margin-top: auto;
  padding: 5px;
}

.start-search input {
  width: 100%;
  padding: 5px 25px 5px 10px;
  border: 1px solid #a0a0a0;
  border-radius: 12px;
  box-sizing: border-box;
  font-size: 12px;
  user-select: text;
  -webkit-user-select: text;
}

.start-right {
  width: 140px;
  display: flex;
  flex-direction: column;
  padding: 15px 10px;
}

.user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.user-profile img {
  width: 48px;
  height: 48px;
  border-radius: 5px;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  margin-bottom: 5px;
}

.user-profile span {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-shadow: 1px 1px 2px #000;
}

.start-right ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.start-right li {
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 3px;
  text-shadow: 1px 1px 2px #000;
}

.start-right li:hover {
  background: rgba(255,255,255,0.2);
}

.start-right hr {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
  margin: 5px 0;
}

/* Windows 7 Taskbar */
.taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: rgba(25, 45, 65, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10001; 
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.start-btn {
  width: 50px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.start-orb {
  width: 36px;
  height: 36px;
  background: radial-gradient(circle at 30% 30%, #5ba7df, #1b5b97);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 5px #fff, 0 0 10px rgba(0,0,0,0.5);
  position: absolute;
  bottom: 2px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease;
}

.start-btn:hover .start-orb {
  filter: brightness(1.2);
  transform: scale(1.1);
}

.start-btn:active .start-orb {
  filter: brightness(0.9);
  transform: scale(0.9);
}

.taskbar-apps {
  display: flex;
  height: 100%;
  align-items: center;
  padding-left: 10px;
  gap: 5px;
  flex: 1; 
}

.taskbar-app {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid transparent;
  color: #fff;
  font-size: 13px;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.taskbar-app:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 5px rgba(255,255,255,0.4);
  transform: translateY(-2px);
}

.taskbar-app:active {
  transform: scale(0.95);
}

.taskbar-app.active {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.5);
}

.taskbar-app img {
  width: 20px;
  height: 20px;
  border-radius: 2px;
}

.taskbar-right {
  display: flex;
  align-items: center;
  height: 100%;
  padding-right: 15px;
  color: #fff;
  font-size: 14px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Aero Glass Window */
.window {
  position: absolute;
  top: 20%;
  left: 30%;
  width: 450px;
  background: rgba(230, 240, 250, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 1px 0 0 rgba(255, 255, 255, 0.4),
    inset -1px 0 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(255, 255, 255, 0.4),
    0 15px 40px rgba(0, 0, 0, 0.5);
  padding: 6px; 
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center bottom;
  z-index: 100;
}

.window.hidden {
  opacity: 0;
  transform: scale(0.5) translateY(200px);
  pointer-events: none;
}

.window.maximized {
  transition: opacity 0.3s ease, transform 0.3s ease, width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-radius 0.4s ease;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 40px) !important;
  border-radius: 0 !important;
  padding: 0 !important;
  border: none !important;
  transform: none !important;
}

.windowheader {
  height: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px 0 2px;
  cursor: grab;
  user-select: none;
}

.windowheader:active {
  cursor: grabbing;
}

.headertext {
  margin: 0;
  font-size: 12px;
  color: #000;
  text-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 8px #fff, 0 0 12px #fff;
  font-weight: normal;
}

.window-controls {
  display: flex;
  gap: 1px;
  height: 20px;
  align-self: flex-start;
  margin-top: -6px;
}

.win-btn {
  width: 28px;
  height: 20px;
  background: linear-gradient(180deg, rgba(240,245,250,0.6) 0%, rgba(200,215,230,0.6) 40%, rgba(160,185,210,0.6) 50%, rgba(200,220,240,0.6) 100%);
  border: 1px solid rgba(17, 26, 35, 0.5);
  border-radius: 3px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.closebutton {
  width: 44px;
  border-top-right-radius: 5px;
}

.win-btn svg {
  width: 10px;
  height: 10px;
  stroke: #1a1a1a;
  stroke-width: 1.5px;
  filter: drop-shadow(0 1px 1px rgba(255,255,255,0.8));
  transition: all 0.2s;
}

.win-btn:hover {
  background: linear-gradient(180deg, rgba(230,245,255,0.8) 0%, rgba(180,220,240,0.8) 40%, rgba(140,200,230,0.8) 50%, rgba(190,230,255,0.8) 100%);
  box-shadow: inset 0 0 3px rgba(255,255,255,1), 0 0 5px rgba(100,200,255,0.6);
  border-color: rgba(17, 26, 35, 0.8);
}

.closebutton:hover {
  background: linear-gradient(180deg, rgba(250,160,160,0.9) 0%, rgba(230,90,90,0.9) 40%, rgba(210,30,30,0.9) 50%, rgba(240,80,80,0.9) 100%);
  box-shadow: inset 0 0 3px rgba(255,255,255,1), 0 0 5px rgba(255,100,100,0.6);
}

.closebutton:hover svg {
  stroke: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.win-btn:active {
  background: linear-gradient(180deg, rgba(140,170,200,0.8) 0%, rgba(180,200,220,0.8) 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.closebutton:active {
  background: linear-gradient(180deg, rgba(180,40,40,0.9) 0%, rgba(220,90,90,0.9) 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.window-content {
  background-color: #fff;
  border: 1px solid #7b7b7b;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1; 
  box-sizing: border-box;
}

/* App Layout Settings */
.app-layout {
  display: flex;
  flex-direction: row !important;
  padding: 0 !important;
  overflow: hidden;
}

.sidebar {
  width: 200px;
  background: #f0f0f0;
  border-right: 1px solid #ccc;
  overflow-y: auto;
}

.sidebar-item {
  padding: 10px 15px;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  transition: background 0.1s;
}

.sidebar-item:hover {
  background: #e6f0fa;
}

.sidebar-item.selected {
  background: #cde8ff;
}

.sidebar-item strong {
  display: block;
  font-size: 13px;
  color: #000;
  margin-bottom: 3px;
}

.sidebar-item span {
  font-size: 11px;
  color: #666;
}

.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #fff;
  user-select: text;
  -webkit-user-select: text;
}

/* File Explorer Styles */
.explorer-toolbar {
  display: flex;
  align-items: center;
  padding: 5px;
  background: linear-gradient(to bottom, #f2f2f2 0%, #ebebeb 50%, #dddddd 51%, #cfcfcf 100%);
  border-bottom: 1px solid #999;
  gap: 10px;
}

.nav-btns {
  display: flex;
  gap: 2px;
}

.nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.8);
  border-color: #999;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.address-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #a0a0a0;
  border-radius: 2px;
  height: 24px;
  padding: 0 5px;
  gap: 5px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.address-icon {
  width: 16px;
  height: 16px;
}

.path-text {
  font-size: 12px;
  color: #000;
}

.search-bar {
  width: 150px;
  background: #fff;
  border: 1px solid #a0a0a0;
  border-radius: 2px;
  height: 24px;
  padding: 0 5px;
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  font-style: italic;
}

.explorer-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: #fff;
}

.explorer-sidebar {
  width: 160px;
  background: #f5f6f7;
  border-right: 1px solid #d9d9d9;
  overflow-y: auto;
  padding: 10px 0;
}

.explorer-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.explorer-sidebar li {
  padding: 4px 10px 4px 25px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
}

.explorer-sidebar li:hover {
  background: #e5f3fb;
}

.explorer-sidebar li.tree-header {
  font-weight: 600;
  padding-left: 10px;
  margin-top: 10px;
}
.explorer-sidebar li.tree-header:first-child {
  margin-top: 0;
}

.explorer-sidebar li.tree-active {
  background: #cce8ff;
  border: 1px solid #99d1ff;
  padding-top: 3px;
  padding-bottom: 3px;
}

.explorer-content {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 15px;
  align-content: flex-start;
}

.file-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

.file-icon:hover {
  background: #e5f3fb;
  border-color: #d8edf9;
}

.file-icon.selected {
  background: #cce8ff;
  border-color: #99d1ff;
}

.file-icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 5px;
  pointer-events: none;
}

.file-icon span {
  font-size: 12px;
  color: #000;
  word-break: break-word;
  pointer-events: none;
}

/* Utilities */
.avatar {
  width: 80px;
  height: 80px;
  border: 2px solid #eee;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar:hover {
  transform: scale(1.1) rotate(5deg);
}

h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  color: #003399; 
}

h2 {
  margin: 0;
  font-size: 14px;
  color: #666;
  font-weight: normal;
}

p {
  margin: 0;
  line-height: 1.5;
  font-size: 13px;
  color: #333;
}

.links {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

a.btn {
  display: inline-block;
  font-size: 12px;
  padding: 4px 15px;
  background: linear-gradient(to bottom, #f2f2f2 0%, #ebebeb 50%, #dddddd 51%, #cfcfcf 100%);
  border: 1px solid #707070;
  border-radius: 3px;
  color: #000;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

a.btn:hover {
  background: linear-gradient(to bottom, #eaf6fd 0%, #d9f0fc 50%, #bee6fd 51%, #a7d9f5 100%);
  border-color: #3c7fb1;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

a.btn:active {
  transform: scale(0.95);
}

/* Minesweeper Styles */
.mine-lcd {
  background: #000;
  color: #ff0000;
  font-family: 'Courier New', Courier, monospace;
  font-size: 24px;
  font-weight: bold;
  padding: 2px 5px;
  border: 1px solid #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  width: 45px;
  text-align: center;
  line-height: 1;
}

.mine-face {
  width: 32px;
  height: 32px;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  cursor: pointer;
  user-select: none;
}
.mine-face:active {
  border: 2px solid #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.mine-grid {
  display: grid;
  grid-template-columns: repeat(9, 24px); /* 9x9 default */
  grid-auto-rows: 24px;
  background: #c0c0c0;
  border: 3px solid #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  user-select: none;
}

.mine-cell {
  width: 24px;
  height: 24px;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 16px;
  font-family: Arial, sans-serif;
  cursor: pointer;
  box-sizing: border-box;
}

.mine-cell:active:not(.revealed):not(.flagged) {
  border: 1px solid #808080;
  background: #d3d3d3;
}

.mine-cell.revealed {
  border: 1px solid #808080;
  background: #d3d3d3;
}

.mine-cell.flagged::after {
  content: '🚩';
  font-size: 14px;
}

.mine-cell.bomb-exploded {
  background: red;
  border: 1px solid #808080;
}
.mine-cell.bomb-exploded::after {
  content: '💣';
  font-size: 14px;
}

.mine-cell.bomb-revealed::after {
  content: '💣';
  font-size: 14px;
}

/* Number colors */
.mine-1 { color: blue; }
.mine-2 { color: green; }
.mine-3 { color: red; }
.mine-4 { color: darkblue; }
.mine-5 { color: darkred; }
.mine-6 { color: teal; }
.mine-7 { color: black; }
.mine-8 { color: gray; }

/* Context Menu */
.context-menu {
  position: absolute;
  width: 220px;
  background-color: #f2f2f2;
  background-image: linear-gradient(to right, #e6ecef 0px, #e6ecef 28px, #fff 29px, #e0e0e0 30px, #f2f2f2 31px, #f2f2f2 100%);
  border: 1px solid #979797;
  box-shadow: 3px 3px 6px rgba(0,0,0,0.15);
  z-index: 999999;
  font-family: "Segoe UI", Tahoma, sans-serif;
  padding: 2px;
  border-radius: 2px;
}
.context-menu.hidden {
  display: none;
}
.context-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.context-menu li {
  padding: 4px 15px 4px 34px;
  font-size: 12px;
  color: #000;
  cursor: default;
  border: 1px solid transparent;
  border-radius: 2px;
  margin: 1px;
}
.context-menu li:hover {
  background: linear-gradient(to bottom, #f0f7fb 0%, #dcebfc 100%);
  border-color: #a8d2fd;
  box-shadow: inset 0 0 1px #fff;
}
.context-menu hr {
  margin: 3px 1px 3px 32px;
  border: none;
  border-top: 1px solid #e0e0e0;
}

/* Resizers */
.resizer {
  position: absolute;
  z-index: 10;
}
.resizer-r { top: 0; right: -4px; width: 8px; height: 100%; cursor: e-resize; }
.resizer-b { bottom: -4px; left: 0; width: 100%; height: 8px; cursor: s-resize; }
.resizer-br { bottom: -4px; right: -4px; width: 12px; height: 12px; cursor: se-resize; }

/* Calculator Styles */
.calc-display {
  background: #f4f7fc;
  border: 1px solid #8ba0bc;
  border-radius: 3px;
  height: 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 10px;
  font-size: 20px;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 5px;
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  flex: 1;
}
.calc-btn {
  background: linear-gradient(to bottom, #f2f6f8 0%, #d8e1e7 100%);
  border: 1px solid #8ba0bc;
  border-radius: 3px;
  font-size: 16px;
  font-family: 'Segoe UI', sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  outline: none;
  transition: all 0.1s;
}
.calc-btn:hover {
  background: linear-gradient(to bottom, #fcfefe 0%, #e8f1f6 100%);
  border-color: #6a82a0;
}
.calc-btn:active {
  background: linear-gradient(to bottom, #d8e1e7 0%, #f2f6f8 100%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}
.calc-op {
  background: linear-gradient(to bottom, #e2ebf4 0%, #c4d4e6 100%);
}
.span-2 {
  grid-column: span 2;
}
