.ticker {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #000000;
  color: #00ff00;
  font-family: 'Courier New', 'Monaco', 'Lucida Console', monospace;
  font-size: 16px;
  z-index: 1000;
  overflow: hidden;
  height: 30px;
  line-height: 30px;
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-left 30s linear infinite;
  padding: 0 20px;
}

.separator {
  margin: 0 40px;
  color: #00ff00;
}

@keyframes scroll-left {
  0% { 
    transform: translateX(100vw); 
  }
  100% { 
    transform: translateX(-100%); 
  }
}

.extra-extra {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 90px;
  margin: 30px 0 0 0;
  padding: 20px;
  color: rgba(0, 0, 0, 0.6);
  -webkit-text-stroke: 2px red;
  text-align: center;
}

body {
  margin: 0;
  padding: 0;
  background-color: #000000;
  position: relative;
  overflow-x: hidden;
}

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: transparent;
}

/* Animated Space Grid */
#space-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: #000000;
  overflow: hidden;
}

/* Static vertical lines radiating from top-center */
.vertical-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.vertical-line {
  position: absolute;
  width: 1px;
  height: 150%;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    #004400 10%, 
    #006600 30%, 
    #006600 70%, 
    #004400 90%, 
    transparent 100%);
  transform-origin: 50% 0%;
}

/* Create 19 vertical lines with wider spread from top-center vanishing point */
.vertical-line:nth-child(1) { left: 50%; transform: translateX(-50%) rotate(0deg); }
.vertical-line:nth-child(2) { left: 50%; transform: translateX(-50%) rotate(7deg); }
.vertical-line:nth-child(3) { left: 50%; transform: translateX(-50%) rotate(-7deg); }
.vertical-line:nth-child(4) { left: 50%; transform: translateX(-50%) rotate(15deg); }
.vertical-line:nth-child(5) { left: 50%; transform: translateX(-50%) rotate(-15deg); }
.vertical-line:nth-child(6) { left: 50%; transform: translateX(-50%) rotate(23deg); }
.vertical-line:nth-child(7) { left: 50%; transform: translateX(-50%) rotate(-23deg); }
.vertical-line:nth-child(8) { left: 50%; transform: translateX(-50%) rotate(32deg); }
.vertical-line:nth-child(9) { left: 50%; transform: translateX(-50%) rotate(-32deg); }
.vertical-line:nth-child(10) { left: 50%; transform: translateX(-50%) rotate(42deg); }
.vertical-line:nth-child(11) { left: 50%; transform: translateX(-50%) rotate(-42deg); }
.vertical-line:nth-child(12) { left: 50%; transform: translateX(-50%) rotate(53deg); }
.vertical-line:nth-child(13) { left: 50%; transform: translateX(-50%) rotate(-53deg); }
.vertical-line:nth-child(14) { left: 50%; transform: translateX(-50%) rotate(65deg); }
.vertical-line:nth-child(15) { left: 50%; transform: translateX(-50%) rotate(-65deg); }
.vertical-line:nth-child(16) { left: 50%; transform: translateX(-50%) rotate(75deg); }
.vertical-line:nth-child(17) { left: 50%; transform: translateX(-50%) rotate(-75deg); }
.vertical-line:nth-child(18) { left: 50%; transform: translateX(-50%) rotate(85deg); }
.vertical-line:nth-child(19) { left: 50%; transform: translateX(-50%) rotate(-85deg); }

/* Moving horizontal lines */
.horizontal-lines {
  position: absolute;
  width: 100%;
  height: 200%;
  top: -100%;
  left: 0;
  animation: moveHorizontalLines 4s linear infinite;
}

.horizontal-line {
  position: absolute;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, 
    transparent 0%, 
    #004400 10%, 
    #006600 50%, 
    #004400 90%, 
    transparent 100%);
}

/* Position horizontal lines */
.horizontal-line:nth-child(1) { top: 0%; }
.horizontal-line:nth-child(2) { top: 10%; }
.horizontal-line:nth-child(3) { top: 20%; }
.horizontal-line:nth-child(4) { top: 30%; }
.horizontal-line:nth-child(5) { top: 40%; }
.horizontal-line:nth-child(6) { top: 50%; }
.horizontal-line:nth-child(7) { top: 60%; }
.horizontal-line:nth-child(8) { top: 70%; }
.horizontal-line:nth-child(9) { top: 80%; }
.horizontal-line:nth-child(10) { top: 90%; }
.horizontal-line:nth-child(11) { top: 100%; }
.horizontal-line:nth-child(12) { top: 110%; }
.horizontal-line:nth-child(13) { top: 120%; }
.horizontal-line:nth-child(14) { top: 130%; }
.horizontal-line:nth-child(15) { top: 140%; }
.horizontal-line:nth-child(16) { top: 150%; }
.horizontal-line:nth-child(17) { top: 160%; }
.horizontal-line:nth-child(18) { top: 170%; }
.horizontal-line:nth-child(19) { top: 180%; }
.horizontal-line:nth-child(20) { top: 190%; }

@keyframes moveHorizontalLines {
  0% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(50%);
  }
}

.star {
  position: absolute;
  border-radius: 50%;
  animation: moveStar linear infinite;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

@keyframes moveStar {
  0% {
    transform: translate(0, 0) scale(0.5);
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.8;
  }
}

/* Windows 3.1 Program Manager Window */
.retro-window {
  width: 70%;
  max-width: 600px;
  min-width: 480px;
  height: 320px;
  margin: 40px auto;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  box-shadow: 1px 1px 0px #000000;
  position: relative;
  z-index: 2;
}

.window-titlebar {
  height: 18px;
  background: #000080;
  color: white;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  font-weight: bold;
  font-size: 11px;
}

.window-icon {
  font-size: 12px;
  margin-right: 4px;
}

.window-title {
  flex-grow: 1;
  font-size: 11px;
  font-weight: bold;
}

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

.window-btn {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  font-size: 8px;
  font-weight: bold;
  color: black;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.window-btn:active {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

.window-content {
  height: calc(100% - 44px);
  background: #c0c0c0;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  margin: 2px;
  padding: 8px;
  overflow: hidden;
}

.program-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 16px 12px;
  height: 100%;
  align-content: start;
}

.program-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 6px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  min-height: 60px;
  border-radius: 0;
}

.program-item:hover {
  background: #d0d0d0;
}

.program-item:active {
  background: #a0a0a0;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translate(1px, 1px);
}

.program-icon {
  font-size: 20px;
  margin-bottom: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
}

.program-image {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.program-label {
  font-size: 8px;
  font-weight: normal;
  line-height: 1.1;
  max-width: 70px;
  word-wrap: break-word;
  color: #000000;
}


.ticker,
.extra-extra {
  position: relative;
  z-index: 2;
}

/* Large Screen Media Queries - Scale retro window for external monitors */
@media (min-width: 1200px) {
  .retro-window {
    max-width: 900px;
    height: 400px;
  }
  
  .window-content {
    height: calc(100% - 46px);
    overflow: auto;
  }
  
  .program-icons {
    gap: 20px 16px;
    height: auto;
    align-content: start;
  }
  
  .program-item {
    min-height: 80px;
    padding: 8px;
  }
  
  .program-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
  }
  
  .program-image {
    width: 28px;
    height: 28px;
  }
  
  .program-label {
    font-size: 10px;
    max-width: 80px;
  }
}

@media (min-width: 1600px) {
  .retro-window {
    max-width: 1200px;
    height: 500px;
  }
  
  .window-content {
    height: calc(100% - 71px);
    padding: 12px;
    overflow: auto;
  }
  
  .program-icons {
    gap: 24px 20px;
    height: auto;
    align-content: start;
  }
  
  .program-item {
    min-height: 100px;
    padding: 10px;
  }
  
  .program-icon {
    font-size: 28px;
    width: 36px;
    height: 36px;
  }
  
  .program-image {
    width: 32px;
    height: 32px;
  }
  
  .program-label {
    font-size: 11px;
    max-width: 90px;
  }
  
  .window-titlebar {
    height: 22px;
    padding: 3px 6px;
  }
  
  .window-title {
    font-size: 12px;
  }
  
  .window-btn {
    width: 20px;
    height: 18px;
    font-size: 10px;
  }
}

@media (min-width: 2000px) {
  .retro-window {
    max-width: 1400px;
    height: 600px;
  }
  
  .window-content {
    height: calc(100% - 69px);
    padding: 16px;
    overflow: auto;
  }
  
  .program-icons {
    gap: 28px 24px;
    height: auto;
    align-content: start;
  }
  
  .program-item {
    min-height: 120px;
    padding: 12px;
  }
  
  .program-icon {
    font-size: 32px;
    width: 40px;
    height: 40px;
  }
  
  .program-image {
    width: 36px;
    height: 36px;
  }
  
  .program-label {
    font-size: 12px;
    max-width: 100px;
  }
  
  .window-titlebar {
    height: 24px;
    padding: 4px 8px;
  }
  
  .window-title {
    font-size: 13px;
  }
  
  .window-btn {
    width: 22px;
    height: 20px;
    font-size: 11px;
  }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  /* Background image mobile optimization */
  body {
    background-size: contain;
    background-position: center top;
  }
  
  /* Header text scaling */
  .extra-extra {
    font-size: clamp(40px, 8vw, 60px);
    margin: 15px 0 0 0;
    padding: 10px;
    -webkit-text-stroke: 1px red;
    word-break: break-all;
    line-height: 1.1;
  }
  
  /* Ticker mobile optimization */
  .ticker {
    font-size: 14px;
    height: 25px;
    line-height: 25px;
  }
  
  .separator {
    margin: 0 20px;
  }
  
  /* Retro window mobile layout */
  .retro-window {
    width: 95%;
    min-width: 300px;
    max-width: none;
    height: auto;
    margin: 20px auto;
  }
  
  /* Window content mobile adjustments */
  .window-content {
    height: auto;
    min-height: 200px;
    padding: 6px;
  }
  
  /* Program icons grid - 3 columns on mobile */
  .program-icons {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 6px;
    height: auto;
  }
  
  /* Program buttons - larger touch targets */
  .program-item {
    min-height: 80px;
    padding: 8px 4px;
  }
  
  /* Program icons scaling */
  .program-icon {
    font-size: 18px;
    width: 24px;
    height: 24px;
  }
  
  .program-image {
    width: 20px;
    height: 20px;
  }
  
  /* Program labels */
  .program-label {
    font-size: 7px;
    max-width: 60px;
    line-height: 1.2;
  }
  
  /* Window controls mobile sizing */
  .window-btn {
    width: 18px;
    height: 16px;
    font-size: 9px;
  }
  
  /* Window title bar mobile adjustments */
  .window-titlebar {
    height: 20px;
    padding: 3px 6px;
  }
  
  .window-icon {
    font-size: 11px;
  }
  
  .window-title {
    font-size: 10px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  /* Background image for very small screens */
  body {
    background-size: cover;
    background-position: center center;
  }
  
  /* Further reduce header size */
  .extra-extra {
    font-size: clamp(24px, 6vw, 40px);
    margin: 10px 0 0 0;
    padding: 5px;
    word-break: break-all;
    line-height: 1.0;
  }
  
  /* Smaller ticker */
  .ticker {
    font-size: 12px;
    height: 22px;
    line-height: 22px;
  }
  
  /* Even smaller window */
  .retro-window {
    width: 98%;
    min-width: 280px;
    margin: 15px auto;
  }
  
  /* 2 columns for very small screens */
  .program-icons {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 4px;
  }
  
  /* Compact program items */
  .program-item {
    min-height: 70px;
    padding: 6px 2px;
  }
  
  .program-label {
    font-size: 6px;
    max-width: 50px;
  }
  
  /* Tighter spacing */
  .separator {
    margin: 0 15px;
  }
}