@font-face {
  font-family: "MS Sans Serif Custom";
  src: url("MS Sans Serif.ttf") format("truetype");
}

body {
  margin: 0;
  padding: 0;
  font-family: "MS Sans Serif Custom", "MS Sans Serif", Tahoma, sans-serif;
  background-color: #008080;
  overflow: hidden;
  user-select: none;
  /* CRT effect */
  animation: flicker 0.15s infinite;
  position: relative;
}

#desktop {
  width: 100vw;
  height: 100vh;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(to right, #1f1f1f, #1f1f1f);
  border-top: 1px solid #fff;
  display: flex;
  align-items: center;
  padding: 0 2px;
  z-index: 9999;
  box-shadow: 0 0 5px rgba(33, 255, 251, 0.1),
              0 0 10px rgba(33, 255, 251, 0.1);
}

.start-button {
  display: flex;
  align-items: center;
  padding: 2px 6px;
  background: linear-gradient(to bottom, #1f1f1f 0%, #1f1f1f 100%);
  border: 1px solid #fff;
  border-radius: 3px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  margin-right: 6px;
}

.start-button:active {
  background: #000;
}

.start-button img {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.start-button.active {
  background: #404040;
  box-shadow: -1px -1px 0 #fff inset, 1px 1px 0 #707070 inset;
}

.taskbar-time {
  margin-left: auto;
  padding: 0 10px;
  color: white;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.window {
  position: absolute;
  background: #c0c0c0;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #707070 inset,
              0 0 5px rgba(33, 255, 251, 0.1),
              0 0 10px rgba(33, 255, 251, 0.1);
  min-width: 200px;
  min-height: 150px;
  z-index: 2;
  border-radius: 6px;
  overflow: hidden;
}

.window-header {
  background: linear-gradient(to right, #000080, #1084d0);
  color: white;
  padding: 3px 5px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.window-content {
  padding: 10px;
  height: calc(100% - 45px);
  overflow-y: auto;
  position: relative;
}

.window-content::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
  background-size: 100% 2px;
  pointer-events: none;
  z-index: 1000;
}

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

.window-button {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #707070 inset;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  border-radius: 2px;
}

.window-button:hover {
  background: #dcdcdc;
}

.window-button:active {
  box-shadow: -1px -1px 0 #fff inset, 1px 1px 0 #707070 inset;
  padding-top: 1px;
  padding-left: 1px;
}

.window.active {
  z-index: 3;
}

.window.dragging {
  opacity: 0.95;
  transform: scale(1.001);
  transition: transform 0.1s ease-out;
}

.post {
  background: white;
  border: 1px solid #848484;
  margin: 10px 0;
  padding: 8px;
  border-radius: 4px;
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.post-avatar {
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border: 1px solid #848484;
  border-radius: 4px;
}

.post-username {
  font-weight: bold;
}

.post-time {
  color: #666;
  font-size: 0.8em;
  margin-left: 8px;
}

.post-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.win2k-button {
  padding: 4px 8px;
  background: #c0c0c0;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #707070 inset;
  cursor: pointer;
  border-radius: 3px;
  white-space: nowrap;
  min-width: 80px;
}

.win2k-button:active {
  box-shadow: -1px -1px 0 #fff inset, 1px 1px 0 #707070 inset;
}

.win2k-input {
  padding: 4px;
  border: 1px solid #848484;
  background: white;
  width: 100%;
  margin-bottom: 8px;
  border-radius: 3px;
}

.win2k-input:focus {
  outline: none;
  border-color: #000080;
}

.file-upload-section {
  margin: 8px 0;
  padding: 8px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.post-file-input {
  width: calc(100% - 16px);
  padding: 8px;
  margin: 0;
  background: white;
}

.selected-file {
  margin-top: 8px;
  font-size: 0.9em;
  color: #666;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  word-break: break-all;
}

.desktop-icon {
  position: absolute;
  width: 75px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px;
  cursor: pointer;
  color: white;
  text-align: center;
  font-size: 12px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
  border-radius: 4px;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.desktop-icon:active {
  background: rgba(255, 255, 255, 0.2);
}

.desktop-icon svg {
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.5));
}

.desktop-icon-label {
  word-wrap: break-word;
  width: 100%;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.desktop-icons {
  position: absolute;
  top: 0;
  left: 0;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 75px);
  grid-gap: 20px;
  z-index: 1;
}

.ie-toolbar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #c0c0c0;
  border-bottom: 1px solid #848484;
}

.address-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: #c0c0c0;
  border-bottom: 1px solid #848484;
}

.address-bar input {
  flex: 1;
}

.search-container {
  padding: 16px;
  background: white;
  height: calc(100% - 80px);
  overflow-y: auto;
}

.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-box input {
  flex: 1;
}

.search-results {
  margin-top: 20px;
}

.search-result {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 4px;
}

.result-title {
  color: #0000EE;
  text-decoration: underline;
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
}

.result-url {
  color: #006400;
  font-size: 12px;
  margin-bottom: 4px;
}

.result-description {
  color: #000;
  font-size: 14px;
}

.news-search {
  margin-bottom: 20px;
}

.news-search .search-box {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #f0f0f0;
  border: 1px solid #848484;
  border-radius: 4px;
}

.news-search .win2k-input {
  flex: 1;
  margin-bottom: 0;
}

.news-search .win2k-button {
  white-space: nowrap;
}

.loading {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.news-window {
  background: white;
}

.breaking-news {
  background: #ffebcc;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ffd699;
  border-radius: 4px;
}

.breaking-news-header {
  color: #cc0000;
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.breaking-news-content {
  font-size: 0.9em;
  line-height: 1.4;
  text-shadow: 0 0 1px rgba(51, 255, 51, 0.4);
}

.news-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-item {
  padding: 15px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  border-radius: 4px;
}

.news-category {
  color: #006699;
  font-size: 0.8em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.news-headline {
  margin: 0 0 5px 0;
  font-size: 1.2em;
  color: #000;
}

.news-date {
  color: #666;
  font-size: 0.8em;
  margin-bottom: 8px;
}

.news-content {
  font-size: 0.9em;
  line-height: 1.4;
  margin: 0;
  color: #333;
  text-shadow: 0 0 1px rgba(51, 255, 51, 0.4);
}

.post-form {
  background: #f0f0f0;
  padding: 10px;
  border: 1px solid #848484;
  margin-bottom: 15px;
  border-radius: 4px;
}

.post-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.post-image {
  margin-top: 10px;
  border: 1px solid #848484;
  padding: 8px;
  background: white;
  border-radius: 4px;
  text-align: center;
}

.post-image img {
  max-width: 100%;
  max-height: 400px;
  display: inline-block;
  border-radius: 2px;
}

.system-info {
  padding: 20px;
  display: flex;
  gap: 20px;
  background: #fff;
  height: calc(100% - 45px);
}

.system-logo {
  padding: 20px;
  background: #f0f0f0;
  border: 1px solid #848484;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.version-info {
  flex: 1;
}

.version-info h2 {
  margin: 0 0 15px 0;
  color: #000080;
  font-size: 1.5em;
}

.game-link {
  display: inline-block;
  color: #0000EE;
  text-decoration: underline;
  margin: 5px 0 15px 0;
  padding: 5px 10px;
  background: #f0f0f0;
  border: 1px solid #848484;
  border-radius: 4px;
}

.game-link:hover {
  background: #e0e0e0;
}

.system-details {
  margin-top: 20px;
  line-height: 1.6;
  padding: 15px;
  background: #f0f0f0;
  border: 1px solid #848484;
  border-radius: 4px;
}

.aol-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.aol-logo {
  width: 20px;
  height: 20px;
}

.aol-content {
  background: #f0f0f0;
}

.aol-welcome {
  background: #fff;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #848484;
  border-radius: 4px;
  font-weight: bold;
  color: #00007f;
  text-align: center;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #707070 inset;
}

.aol-online-count {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

.aol-users-online {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid #848484;
  margin-bottom: 15px;
  border-radius: 4px;
  overflow-x: auto;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #707070 inset;
}

.aol-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
}

.aol-user-avatar {
  width: 40px;
  height: 40px;
  border: 1px solid #848484;
  border-radius: 4px;
  padding: 2px;
  background: white;
}

.aol-user-name {
  font-size: 0.8em;
  text-align: center;
  color: #00007f;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aol-post-form {
  background: #fff;
  border: 1px solid #848484;
  padding: 12px;
  margin-bottom: 15px;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #707070 inset;
}

.aol-button {
  background: #00007f;
  color: white;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #4444ff inset, -1px -1px 0 #000066 inset;
  min-width: 100px;
}

.aol-button:hover {
  background: #0000aa;
}

.aol-button:active {
  box-shadow: -1px -1px 0 #4444ff inset, 1px 1px 0 #000066 inset;
}

.aol-posts {
  padding: 8px;
}

.aol-posts .post {
  background: #fff;
  border: 1px solid #848484;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s ease;
}

.aol-posts .post:hover {
  transform: translateY(-1px);
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.15);
}

.post-interactions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e0e0e0;
  flex-wrap: wrap;
}

.reaction-button {
  padding: 4px 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f5f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.reaction-button:hover {
  background: #e5e5e5;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reaction-button.active {
  background: #e1f0ff;
  border-color: #0066cc;
  color: #0066cc;
  transform: scale(1.05);
}

.reaction-button:active {
  transform: scale(0.95);
}

.interaction-count {
  color: #666;
  font-size: 0.9em;
  margin-left: 4px;
  min-width: 20px;
  text-align: center;
}

.post-reactions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.delete-button {
  margin-left: auto;
  background: #ff0000;
  color: white;
  border: 1px solid #cc0000;
  box-shadow: 1px 1px 0 #ff4444 inset, -1px -1px 0 #990000 inset;
}

.delete-button:hover {
  background: #cc0000;
}

.delete-button:active {
  box-shadow: -1px -1px 0 #ff4444 inset, 1px 1px 0 #990000 inset;
}

.start-menu {
  position: fixed;
  bottom: 28px;
  left: 0;
  width: 200px;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-bottom: none;
  box-shadow: 1px 1px 0 #000 inset, -1px -1px 0 #707070 inset;
  z-index: 10000;
  display: none;
  padding: 2px;
}

.start-menu.active {
  display: block;
}

.start-menu-header {
  background: linear-gradient(to right, #000080, #1084d0);
  color: white;
  padding: 5px;
  height: 50px;
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.start-menu-header span {
  font-size: 20px;
  font-weight: bold;
  margin-left: 8px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.start-menu-items {
  display: flex;
  flex-direction: column;
}

.start-menu-item {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  cursor: pointer;
  color: black;
  text-decoration: none;
}

.start-menu-item:hover {
  background: #000080;
  color: white;
}

.start-menu-item img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.start-menu-separator {
  height: 1px;
  background: #848484;
  margin: 4px 0;
  border-bottom: 1px solid white;
}

#windows-loading-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 9999;
}

.windows-loading-image {
  width: 100%;
  height: calc(100% - 40px);
  object-fit: cover;
}

.windows-loading-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #000080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.windows-loading-bar-container {
  width: 300px;
  height: 24px;
  background: #c3c3c3;
  border: 2px solid #fff;
  position: relative;
  overflow: hidden;
}

.windows-loading-bar {
  position: absolute;
  left: -200px;
  top: 0;
  height: 100%;
  width: 200px;
  background: linear-gradient(to right, #000080, #1084d0);
  animation: moveLoadingBar 2s linear infinite;
}

@keyframes moveLoadingBar {
  0% {
    left: -200px;
  }
  100% {
    left: 100%;
  }
}

#boot-screen {
  background: #000;
  color: #fff;
  font-family: "Courier New", monospace;
  width: 100vw;
  height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow: hidden;
  position: relative;
}

.energy-star-logo {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 100px;
  height: auto;
}

.boot-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
  animation: typing 0.1s steps(1) infinite;
}

.boot-progress {
  margin-top: 20px;
  height: 2px;
  background: #000080;
  width: 0;
  transition: width 17s linear;
}

@keyframes typing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.9; }
}

@keyframes flicker {
  0% { opacity: 0.99; }
  100% { opacity: 1; }
}

#desktop::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
  z-index: 9999;
}

#desktop::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(18, 16, 16, 0.1);
  opacity: 0;
  z-index: 9999;
  pointer-events: none;
  animation: flicker 0.15s infinite;
}

#shutdown-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 10000;
  display: none;
}

.shutdown-message {
  position: absolute;
  bottom: 100px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-family: "MS Sans Serif Custom", "MS Sans Serif", Tahoma, sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.shutdown-message h1 {
  margin-bottom: 20px;
  font-size: 24px;
}

.shutdown-progress {
  width: 300px;
  height: 24px;
  background: #c3c3c3;
  border: 2px solid #fff;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.shutdown-bar {
  position: absolute;
  left: -200px;
  top: 0;
  height: 100%;
  width: 200px;
  background: linear-gradient(to right, #000080, #1084d0);
  animation: moveLoadingBar 2s linear infinite;
}

.settings-content {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

.achievement-notification {
  position: fixed;
  bottom: 40px;
  right: -400px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 10000;
  transition: right 0.5s ease-out;
}

.achievement-notification.show {
  right: 20px;
}

.achievement-notification .achievement-icon {
  font-size: 24px;
}

.achievement-notification .achievement-content {
  flex: 1;
}

.achievement-notification .achievement-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.achievements-content {
  background: white;
  padding: 20px;
}

.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.achievement-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.achievement-item.locked {
  opacity: 0.7;
  background: #e0e0e0;
}

.achievement-item .achievement-icon {
  font-size: 24px;
}

.achievement-item .achievement-details {
  flex: 1;
}

.achievement-item .achievement-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.achievement-item .achievement-description {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 5px;
}

.achievement-item .achievement-date {
  font-size: 0.8em;
  color: #999;
}

.owner-badge {
  color: #ff0000;
  font-weight: bold;
  margin-left: 5px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

.post-header .owner-badge {
  font-size: 0.8em;
}

.aol-user-name .owner-badge {
  font-size: 0.7em;
  display: block;
  text-align: center;
}

.specs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.edit-specs-button {
  font-size: 0.9em;
  padding: 2px 8px;
}

.specs-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-input-group label {
  font-size: 0.9em;
  color: #000080;
}

.spec-input-group input {
  padding: 2px 4px;
  font-size: 0.9em;
}

.reset-specs-button {
  margin-top: 10px;
  background: #ff0000;
  color: white;
  border: 1px solid #cc0000;
  box-shadow: 1px 1px 0 #ff4444 inset, -1px -1px 0 #990000 inset;
}

.reset-specs-button:hover {
  background: #cc0000;
}

.specs-display {
  line-height: 1.6;
}