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

body {
  font-family: 'MS Sans Serif', 'Microsoft Sans Serif', sans-serif;
  background: #008080;
  overflow: hidden;
  height: 100vh;
}

.app {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Window */
.window {
  width: min(900px, 100%);
  height: min(650px, 90vh);
  background: #C0C0C0;
  border: 2px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

/* Title Bar */
.title-bar {
  background: linear-gradient(to right, #0000AA, #1084D0);
  color: white;
  padding: 3px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
}

.title-bar-text {
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
}

.title-icon {
  font-size: 14px;
}

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

.title-button {
  width: 16px;
  height: 14px;
  background: #C0C0C0;
  border: 1px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.title-button:active {
  border-color: #000000 #FFFFFF #FFFFFF #000000;
}

.title-button.close:hover {
  background: #C00000;
  color: white;
}

/* Menu Bar */
.menu-bar {
  background: #C0C0C0;
  border-bottom: 1px solid #808080;
  display: flex;
  padding: 2px 5px;
}

.menu-item {
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}

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

/* Address Bar */
.address-bar {
  background: #C0C0C0;
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid #808080;
}

.address-label {
  font-size: 11px;
}

.address-input {
  flex: 1;
  background: white;
  border: 1px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
  padding: 2px 5px;
  font-size: 11px;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: white;
  border-right: 1px solid #808080;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.sidebar-logo {
  font-size: 48px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.sidebar h2 {
  font-size: 14px;
  color: #000080;
}

.sidebar-text {
  font-size: 10px;
  line-height: 1.4;
  color: #000000;
}

.sidebar-instruction {
  font-size: 10px;
  font-style: italic;
  color: #666;
  margin-top: 10px;
}

.sidebar-description {
  margin-top: 15px;
  padding: 10px;
  background: #FFFEF0;
  border: 1px solid #C0C0C0;
}

.sidebar-description strong {
  font-size: 11px;
  color: #000080;
  display: block;
  margin-bottom: 5px;
}

.sidebar-description p {
  font-size: 10px;
  color: #000;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 15px;
}

.sidebar-footer a {
  font-size: 10px;
  color: #0000FF;
  text-decoration: underline;
}

/* Icon Grid */
.icon-grid {
  flex: 1;
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 20px;
  overflow-y: auto;
  align-content: start;
}

.control-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: 1px solid transparent;
}

.control-icon:hover {
  background: rgba(0, 0, 128, 0.1);
  border: 1px dotted #000080;
}

.control-icon:active {
  background: rgba(0, 0, 128, 0.2);
}

.icon-image {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-label {
  font-size: 10px;
  text-align: center;
  max-width: 100%;
  word-wrap: break-word;
}

/* Status Bar */
.status-bar {
  background: #C0C0C0;
  border-top: 1px solid #FFFFFF;
  padding: 3px 5px;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  border: 1px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
}

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: #C0C0C0;
  border-top: 2px solid #FFFFFF;
  display: flex;
  align-items: center;
  padding: 2px;
  z-index: 1000;
}

.start-button {
  height: 24px;
  padding: 0 15px 0 5px;
  background: #C0C0C0;
  border: 2px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.start-button:active {
  border-color: #000000 #FFFFFF #FFFFFF #000000;
}

.windows-logo {
  font-size: 14px;
}

.taskbar-time {
  margin-left: auto;
  font-size: 11px;
  padding: 0 10px;
  border: 1px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
  line-height: 20px;
}

/* Start Menu */
.start-menu {
  position: fixed;
  bottom: 30px;
  left: 2px;
  width: 200px;
  background: #C0C0C0;
  border: 2px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  z-index: 1001;
}

.start-menu-item {
  padding: 8px 30px 8px 15px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.start-menu-separator {
  height: 1px;
  background: #808080;
  margin: 2px 5px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-window {
  width: min(450px, 90%);
  max-height: 80vh;
  background: #C0C0C0;
  border: 2px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  position: absolute;
}

.modal-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-content h3 {
  font-size: 14px;
  margin-bottom: 15px;
  color: #000080;
}

.setting-group {
  margin-bottom: 15px;
}

.setting-group label {
  font-size: 11px;
  display: block;
  margin-bottom: 5px;
}

.setting-group select,
.setting-group input[type="range"] {
  width: 100%;
  padding: 3px;
  font-size: 11px;
  border: 1px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
}

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.theme-option {
  padding: 10px;
  background: #C0C0C0;
  border: 2px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  font-size: 11px;
  cursor: pointer;
}

.theme-option.active {
  background: #000080;
  color: white;
}

.theme-option:hover {
  background: #DFDFDF;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #808080;
}

.win98-button {
  min-width: 75px;
  padding: 5px 15px;
  background: #C0C0C0;
  border: 2px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  font-size: 11px;
  cursor: pointer;
}

.win98-button:active {
  border-color: #000000 #FFFFFF #FFFFFF #000000;
}

.win98-button-small {
  padding: 3px 8px;
  background: #C0C0C0;
  border: 2px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  font-size: 10px;
  cursor: pointer;
}

.win98-button-small:active {
  border-color: #000000 #FFFFFF #FFFFFF #000000;
}

/* Progress Bar */
.progress-bar {
  margin-top: 10px;
  height: 20px;
  background: white;
  border: 1px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #000080;
  transition: width 0.1s;
}

/* Apps List */
.apps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-item {
  padding: 10px;
  background: #FFFFFF;
  border: 1px solid #808080;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-info strong {
  font-size: 11px;
  display: block;
  margin-bottom: 5px;
}

.app-meta {
  font-size: 9px;
  color: #666;
  display: flex;
  gap: 10px;
}

.app-actions {
  display: flex;
  gap: 5px;
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: #C0C0C0;
  border: 2px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-width: 150px;
}

.context-menu-item {
  padding: 6px 25px 6px 10px;
  font-size: 11px;
  cursor: pointer;
}

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

.context-menu-separator {
  height: 1px;
  background: #808080;
  margin: 2px 5px;
}

/* Shutdown Screen */
.shutdown-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000080;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.shutdown-message {
  text-align: center;
  color: white;
}

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

.shutdown-message h2 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
}

.shutdown-message p {
  font-size: 12px;
  margin-bottom: 25px;
  opacity: 0.9;
}

/* Berry Assistant */
.berry-assistant {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 999;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
  }
  to {
    transform: translateX(0);
  }
}

.berry-bubble {
  background: #FFFEF0;
  border: 2px solid #000000;
  border-radius: 10px;
  padding: 15px;
  max-width: 280px;
  position: relative;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.berry-bubble::before {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 30px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #000000;
}

.berry-icon {
  font-size: 32px;
  text-align: center;
  margin-bottom: 10px;
}

.berry-text strong {
  font-size: 11px;
  display: block;
  margin-bottom: 8px;
  color: #000080;
}

.berry-text p {
  font-size: 10px;
  line-height: 1.4;
  margin: 0;
}

.berry-close {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #C0C0C0;
  border: 1px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  width: 18px;
  height: 18px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.berry-close:hover {
  background: #C00000;
  color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .window {
    width: 100%;
    height: 100%;
  }

  .main-content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #808080;
  }

  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 15px;
  }

  .modal-window {
    width: 95%;
  }

  .berry-assistant {
    bottom: 60px;
    right: 10px;
  }

  .berry-bubble {
    max-width: calc(100vw - 40px);
  }
}

/* Footer */
.footer {
  position: fixed;
  bottom: 35px;
  right: 10px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  z-index: 999;
}

.footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}