/* Shutdown overlay animation */
#shutdown-overlay {
  display: none;
}
@keyframes shutdownFade {
  0% { background: rgba(255,255,255,1); }
  100% { background: #000; }
}
.dark-theme #shutdown-overlay {
  background: #000 !important;
}
.dark-theme #shutdown-overlay #shutdown-text {
  color: #fff !important;
}
/* Restart overlay dark mode support */
.dark-theme #restart-overlay {
  background: rgba(30,30,30,0.97) !important;
}
.dark-theme #restart-overlay .restart-spinner {
  border: 8px solid #333;
  border-top: 8px solid #ffeb3b;
}
.dark-theme #restart-overlay .restart-text {
  color: #fff !important;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Fun animation for restart */
@keyframes spin-restart {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(1080deg) scale(1.5); }
}
.menu-icon.restart-spin {
  animation: spin-restart 1s cubic-bezier(0.4,2,0.6,1) forwards;
  box-shadow: 0 0 24px 8px #ffeb3b;
  filter: brightness(1.2) drop-shadow(0 0 8px #ffeb3b);
}

/* Dropdown menu item hover background for dark theme */
body.dark-theme .dropdown-menu a:hover {
  background: #fff !important;
  color: #222 !important;
}
@font-face {
  font-family: 'Chicago';
  src: url('assets/fonts/chicagoflf.woff2') format('woff2'),
       url('assets/fonts/chicagoflf.woff') format('woff'),
       url('assets/fonts/chicagoflf.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
body {
  margin: 0;
  background: #bdbdbd;
  font-family: 'Chicago', 'Monaco', monospace;
  transition: background 0.3s, color 0.3s;
}
body.dark-theme {
  background: #222 !important;
  color: #eee !important;
}
#menu-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 4px solid #222;
  height: 40px;
  font-size: 2em;
  padding-left: 10px;
  letter-spacing: 2px;
  color: #222;
  transition: background 0.3s, color 0.3s;
  z-index: 100;
  position: relative;
}
body.dark-theme #menu-bar {
  background: #333 !important;
  color: #eee !important;
}
.menu-item {
  margin-right: 30px;
  cursor: pointer;
  color: inherit;
  font-size: 20px;
  letter-spacing: 0px;
  height: 100%;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 0 12px;
  position: relative;
}
/* Menu item hover background for light theme */
#menu-bar .menu-item:hover {
  background: #fff !important;
  color: #000 !important;
  transition: background 0.2s, color 0.2s;
}
/* Menu item hover background for dark theme */
body.dark-theme #menu-bar .dropdown-menu .menu-item:hover {
  background: #000 !important;
  color: #fff !important;
}
body.dark-theme .menu-item .dropdown-menu {
  color: #eee !important;
}
.menu-item {
  position: relative;
}
.menu-item:hover .dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

/* Avatar dropdown menu style */
.menu-item[data-menu="avatar"] .dropdown-menu {
  display: none;
}
.menu-item[data-menu="avatar"]:hover .dropdown-menu {
  display: flex;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff !important;
  background-color: #fff !important;
  border: 4px solid #000;
  padding: 8px 6px;
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 20px;
  z-index: 2000;
}

a.dropdown-menu a, .dropdown-menu a:visited, .dropdown-menu a:active {
  color: #222 !important;
}
body.dark-theme .dropdown-menu a, body.dark-theme .dropdown-menu a:visited, body.dark-theme .dropdown-menu a:active {
  color: #fff !important;
}
/* Dropdown menu item hover background for light theme */
.dropdown-menu a {
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.dropdown-menu a:hover {
  background: #222;
  color: #fff !important;
  transition: background 0.2s, color 0.2s;
}


body.dark-theme .dropdown-menu {
  background: #222 !important;
  background-color: #222 !important;
  border: 4px solid #fff !important;
}

.dropdown-menu a {
  color: #222;
  text-decoration: none;
  font-family: inherit;
}
.dropdown-menu a:hover {
  text-decoration: underline;
}
#sidebar {
  position: fixed;
  right: 0;
  top: 40px;
  width: 160px;
  height: calc(100vh - 40px);
  background: #e0e0e0;
  border-left: 4px solid #222;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 20px;
}
.sidebar-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 48px;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  cursor: pointer;
}
.sidebar-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
}
.sidebar-img {
  width: 64px;
  height: 64px;
  margin-bottom: 0;
  image-rendering: pixelated;
  display: block;
}
.sidebar-alias {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}
.sidebar-label {
  margin-top: 8px;
  background: none;
  border: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1em;
  font-weight: normal;
  color: #222;
  text-align: center;
  padding: 0;
  min-width: 0;
  box-sizing: border-box;
  display: inline-block;
}
body.dark-theme .sidebar-label {
  color: #eee !important;
}
#desktop {
  margin-top: 50px;
  margin-left: 30px;
  display: flex;
  gap: 40px;
}
.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.icon-img {
  width: 48px;
  height: 48px;
  background: #fff !important;
  background-color: #fff !important;
body.dark-theme .dropdown-menu {
  background: #222 !important;
  border: 4px solid #fff !important;
}
  border: 2px solid #222;
  border-radius: 6px;
  margin-bottom: 8px;
}
.icon-label {
  font-size: 1em;
  color: #222;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif !important;
}
body.dark-theme .icon-label {
  color: #eee !important;
}
/* Desktop right icons flush to right edge, vertically centered */
#desktop-right {
  position: fixed;
  top: 0;
  right: 0;
  width: 160px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 2;
  background: none;
  pointer-events: auto;
}
.window-items {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 40px 40px;
}
.window-icon {
  width: 120px;
  margin-bottom: 20px;
}
.window-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
}
.window-icon a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}
.icon-frame {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-frame img.icon-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 30px;
  height: 30px;
  z-index: 2;
}
.icon-frame img.icon-frame-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  z-index: 1;
}
a, a:visited, a:active {
  color: #1b718d !important;
  text-decoration: none;
}
#theme-toggle img {
  filter: invert(0);
  transition: filter 0.3s;
}
body.dark-theme #theme-toggle img {
  filter: invert(1);
}
body.dark-theme .mac-window {
  background: #1e1e1e !important;
  border-color: #444 !important;
  color: #eee !important;
}
body.dark-theme .window-title-bar {
  background: #2c2c2c !important;
  border-bottom-color: #444 !important;
  color: #eee !important;
}
body.dark-theme .window-info {
  background-color: #2c2c2c !important;
  color: #e0e0e0 !important;
}
body.dark-theme .window-label,
body.dark-theme .window-content {
  color: #e0e0e0 !important;
}
