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

body {
  background: linear-gradient(135deg, #0a1f1a 0%, #1a3a2e 50%, #0d2818 100%);
  background-size: cover;
  background-attachment: fixed;
  font-family: 'Orbitron', monospace;
  color: #00ff00;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Animated background scanlines */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 255, 0, 0.03) 0px,
    rgba(0, 255, 0, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 1;
  animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(10px);
  }
}

/* Terminal glow effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

/* TOP BAR */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(10, 31, 26, 0.95);
  border-bottom: 3px solid #00ff00;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 101;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3), inset 0 0 20px rgba(0, 255, 0, 0.05);
  backdrop-filter: blur(10px);
}

.os-name {
  font-size: 1.4em;
  color: #ffbb00;
  text-shadow: 0 0 10px #ffbb00, 0 0 20px #00ff00;
  letter-spacing: 2px;
  font-weight: bold;
  animation: flicker 0.15s infinite;
  cursor: grab;
  user-select: none;
}

.os-name:active {
  cursor: grabbing;
}

.top-bar-status {
  font-size: 0.9em;
  color: #00ff00;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.6);
  letter-spacing: 1px;
}

.time-display {
  font-size: 1em;
  color: #ffbb00;
  text-shadow: 0 0 10px #ffbb00;
  letter-spacing: 1px;
  font-weight: bold;
  min-width: 200px;
  text-align: right;
}

@keyframes flicker {
  0%, 100% {
    text-shadow: 0 0 10px #ffbb00, 0 0 20px #00ff00;
  }
  50% {
    text-shadow: 0 0 5px #ffbb00, 0 0 10px #00ff00;
  }
}

/* DESKTOP */
.desktop {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #0a1f1a 0%, #1a3a2e 50%, #0d2818 100%);
  background-size: 400% 400%;
  animation: desktopGradient 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
  z-index: 2;
}

@keyframes desktopGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* WINDOW */
.window {
  max-width: 700px;
  width: 100%;
  background: rgba(10, 31, 26, 0.92);
  border: 3px solid #00ff00;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 255, 0, 0.4), inset 0 0 30px rgba(0, 255, 0, 0.1);
  animation: glow-pulse 3s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  position: absolute;
  z-index: 1;
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.4), inset 0 0 30px rgba(0, 255, 0, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.6), inset 0 0 40px rgba(0, 255, 0, 0.2);
  }
}

/* WINDOW HEADER */
.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 2px solid #00ff00;
  cursor: grab;
  user-select: none;
  background: rgba(0, 255, 0, 0.05);
  border-radius: 5px 5px 0 0;
}

.window-header:active {
  cursor: grabbing;
}

.header-title {
  font-size: 1.2em;
  color: #ffbb00;
  text-shadow: 0 0 10px #ffbb00;
  letter-spacing: 1px;
  font-weight: bold;
}

.close-button {
  width: 24px;
  height: 24px;
  background-color: #ff4444;
  border: 2px solid #ff8888;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
}

.close-button:hover {
  background-color: #ff6666;
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
  transform: scale(1.1);
}

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

/* WINDOW CONTENT */
.window-content {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(80vh - 70px);
}

h1 {
  font-size: 3em;
  margin: 0 0 15px 0;
  color: #ffbb00;
  text-shadow: 0 0 10px #ffbb00, 0 0 20px #00ff00;
  letter-spacing: 3px;
  text-align: center;
}

.subtitle {
  font-size: 1.1em;
  color: #00ff00;
  margin-bottom: 25px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
  text-align: center;
}

.spartan-status {
  background: rgba(0, 255, 0, 0.05);
  border: 2px dashed #00ff00;
  padding: 20px;
  margin: 20px 0;
  border-radius: 3px;
  font-size: 0.95em;
  line-height: 1.6;
}

.spartan-status strong {
  color: #ffbb00;
  text-shadow: 0 0 5px #ffbb00;
}

img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin: 20px auto;
  border: 3px solid #ffbb00;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 187, 0, 0.5), inset 0 0 20px rgba(255, 187, 0, 0.2);
  animation: float 3s ease-in-out infinite;
  display: block;
}

/* Scanner effect for welcome image */
.welcome-scanner {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-ring {
  position: absolute;
  width: 160px;
  height: 160px;
  border: 3px solid transparent;
  border-top: 3px solid #ffbb00;
  border-right: 3px solid #ffbb00;
  border-radius: 50%;
  animation: scanner-spin 3s linear infinite;
  box-shadow: 0 0 15px rgba(255, 187, 0, 0.4);
}

.scanner-ring::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0, 255, 0, 0.2);
  border-radius: 50%;
  top: -2px;
  left: -2px;
}

.scanner-image {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 3px solid #ffbb00;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 187, 0, 0.5), inset 0 0 20px rgba(255, 187, 0, 0.2);
  animation: float 3s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes scanner-spin {
  0% {
    transform: rotate(0deg);
    box-shadow: 0 0 15px rgba(255, 187, 0, 0.4), inset 0 0 15px rgba(0, 255, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 187, 0, 0.6), inset 0 0 20px rgba(0, 255, 0, 0.3);
  }
  100% {
    transform: rotate(360deg);
    box-shadow: 0 0 15px rgba(255, 187, 0, 0.4), inset 0 0 15px rgba(0, 255, 0, 0.2);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.mission-log {
  text-align: left;
  background: rgba(0, 255, 0, 0.03);
  padding: 15px;
  margin: 20px 0;
  border-left: 4px solid #ffbb00;
  border-radius: 2px;
}

.mission-log h3 {
  color: #ffbb00;
  margin-bottom: 10px;
  text-shadow: 0 0 5px #ffbb00;
}

.mission-log ul {
  list-style: none;
  padding-left: 20px;
}

.mission-log li {
  margin: 8px 0;
  position: relative;
}

.mission-log li::before {
  content: '>';
  position: absolute;
  left: -15px;
  color: #00ff00;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.links-section {
  margin: 30px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

a {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid #00ff00;
  color: #00ff00;
  text-decoration: none;
  border-radius: 3px;
  font-weight: bold;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
  letter-spacing: 1px;
  font-size: 0.9em;
}

a:hover {
  background: rgba(255, 187, 0, 0.2);
  border-color: #ffbb00;
  color: #ffbb00;
  box-shadow: 0 0 15px rgba(255, 187, 0, 0.6), inset 0 0 15px rgba(255, 187, 0, 0.1);
  transform: scale(1.05);
}

a:active {
  transform: scale(0.98);
}

.footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px dashed #00ff00;
  color: #00ff00;
  font-size: 0.85em;
  opacity: 0.7;
  text-align: center;
}

.footer p {
  margin: 5px 0;
}

.signature {
  color: #ffbb00;
  text-shadow: 0 0 5px #ffbb00;
  font-weight: bold;
}

/* Scrollbar styling for window content */
.window-content::-webkit-scrollbar {
  width: 10px;
}

.window-content::-webkit-scrollbar-track {
  background: rgba(0, 255, 0, 0.05);
}

.window-content::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 0, 0.3);
  border-radius: 5px;
}

.window-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 0, 0.6);
}

/* Responsive design */
@media (max-width: 768px) {
  .top-bar {
    height: 50px;
    padding: 0 15px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }

  .desktop {
    top: 50px;
  }

  h1 {
    font-size: 2em;
  }

  .window {
    max-height: 90vh;
  }

  .window-content {
    max-height: calc(90vh - 70px);
  }

  .time-display {
    min-width: auto;
    text-align: center;
    font-size: 0.8em;
  }

  img {
    width: 120px;
    height: 120px;
  }

  .links-section {
    flex-direction: column;
  }

  a {
    width: 100%;
  }
}

/* APP ICONS */
.app-icons-container {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.app-icon img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 2px solid #00ff00;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
  margin: 0;
  animation: none;
  display: block;
}

.app-icon span {
  color: #00ff00;
  font-size: 0.9em;
  text-align: center;
  max-width: 100px;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.app-icon.selected img {
  border: 3px solid #ffbb00;
  box-shadow: 0 0 20px rgba(255, 187, 0, 0.6);
  transform: scale(1.1);
}

.app-icon.selected span {
  color: #ffbb00;
  text-shadow: 0 0 10px #ffbb00;
  font-weight: bold;
}

.app-icon:hover img {
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
  transform: scale(1.05);
}

/* SIDEBAR AND CONTENT AREA */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  background: rgba(0, 255, 0, 0.03);
  border-right: 2px solid #00ff00;
  border-radius: 5px;
  min-width: 200px;
  max-height: 400px;
  overflow-y: auto;
}

.sidebar-item {
  padding: 12px;
  background: rgba(0, 255, 0, 0.05);
  border: 1px solid #00ff00;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.sidebar-item:hover {
  background: rgba(0, 255, 0, 0.15);
  transform: translateX(5px);
}

.sidebar-item.active {
  background: rgba(255, 187, 0, 0.2);
  border-color: #ffbb00;
  box-shadow: 0 0 10px rgba(255, 187, 0, 0.4);
}

.sidebar-title {
  color: #ffbb00;
  font-weight: bold;
  font-size: 0.95em;
  text-shadow: 0 0 5px #ffbb00;
}

.sidebar-date {
  color: #00ff00;
  font-size: 0.8em;
  opacity: 0.7;
}

.content-area {
  flex: 1;
  padding: 20px;
  background: rgba(0, 255, 0, 0.02);
  border-radius: 5px;
  overflow-y: auto;
}

.content-header {
  text-align: center;
  color: #ffbb00;
  font-size: 1.2em;
  text-shadow: 0 0 10px #ffbb00;
  margin: 50px 0;
}

.content-item {
  color: #00ff00;
  line-height: 1.6;
}

.content-item h2 {
  color: #ffbb00;
  text-shadow: 0 0 5px #ffbb00;
  margin-bottom: 10px;
}

.content-item strong {
  color: #ffbb00;
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.stat-card {
  background: rgba(0, 255, 0, 0.08);
  border: 2px solid #00ff00;
  border-radius: 5px;
  padding: 20px;
  text-align: center;
}

.stat-label {
  color: #ffbb00;
  font-size: 0.85em;
  font-weight: bold;
  text-shadow: 0 0 5px #ffbb00;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.stat-value {
  color: #00ff00;
  font-size: 1.8em;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
  margin-bottom: 15px;
}

.stat-bar {
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid #00ff00;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
}

.stat-progress {
  background: linear-gradient(90deg, #00ff00, #ffbb00);
  height: 100%;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
  transition: width 0.5s ease;
}

/* SYSTEM MONITOR */
.monitor-terminal {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #00ff00;
  border-radius: 3px;
  padding: 15px;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  height: 250px;
  overflow-y: auto;
  box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.1);
}

.terminal-line {
  color: #ffbb00;
  margin: 5px 0;
  letter-spacing: 0.5px;
  text-shadow: 0 0 5px rgba(255, 187, 0, 0.3);
}

.terminal-line::before {
  content: '>> ';
  color: #00ff00;
}

.monitor-button {
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid #00ff00;
  color: #00ff00;
  padding: 12px 30px;
  font-family: 'Orbitron', monospace;
  font-size: 0.9em;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
  letter-spacing: 1px;
  user-select: none;
}

.monitor-button:hover {
  background: rgba(0, 255, 0, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
  transform: scale(1.05);
}

.monitor-button:active {
  transform: scale(0.98);
}

.system-notification {
  background: rgba(255, 187, 0, 0.1);
  border: 2px solid #ffbb00;
  border-radius: 3px;
  padding: 12px;
  margin: 10px 0;
  color: #ffbb00;
  animation: notification-pop 0.4s ease;
  box-shadow: 0 0 15px rgba(255, 187, 0, 0.3);
}

.system-notification strong {
  color: #ffbb00;
  text-shadow: 0 0 5px #ffbb00;
}

@keyframes notification-pop {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
