@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&display=swap');

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

body {
  font-family: 'VT323', monospace;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.amiga-simulator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 800px;
  width: 100%;
}

/* Monitor Frame */
.monitor-frame {
  background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 50%, #1a1a1a 100%);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 
    0 10px 40px rgba(0,0,0,0.5),
    inset 0 2px 4px rgba(255,255,255,0.1);
}

.monitor-bezel {
  background: #1a1a1a;
  border-radius: 15px;
  padding: 15px;
  box-shadow: inset 0 5px 20px rgba(0,0,0,0.8);
}

.crt-screen {
  width: 100%;
  aspect-ratio: 4/3;
  min-height: 300px;
  max-height: 400px;
  background: #101010;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 
    inset 0 0 50px rgba(0,100,200,0.1),
    0 0 2px rgba(100,200,255,0.5);
}

.crt-screen.scanlines::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.3) 0px,
    rgba(0,0,0,0.3) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  animation: flicker 0.1s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.97; }
  50% { opacity: 1; }
}

.monitor-base {
  background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
  height: 30px;
  margin-top: 10px;
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  color: #666;
  font-size: 12px;
  letter-spacing: 4px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
}

/* Computer Case */
.computer-case {
  background: linear-gradient(180deg, #D4C8B0 0%, #C0B090 50%, #A09070 100%);
  width: 100%;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 
    0 5px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

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

.amiga-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  color: #333;
  font-size: 18px;
}

.rainbow-check {
  display: flex;
  flex-direction: column;
  width: 8px;
  height: 24px;
  transform: skewX(-10deg);
}

.check-stripe {
  flex: 1;
}

.check-stripe.red { background: #FF0000; }
.check-stripe.orange { background: #FF8800; }
.check-stripe.yellow { background: #FFFF00; }
.check-stripe.green { background: #00AA00; }

.floppy-drive {
  background: #888;
  width: 120px;
  height: 20px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 3px 5px;
  gap: 5px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.floppy-slot {
  flex: 1;
  height: 4px;
  background: #222;
  border-radius: 2px;
}

.eject-btn {
  width: 15px;
  height: 10px;
  background: #666;
  border-radius: 2px;
  cursor: pointer;
}

.eject-btn:hover {
  background: #888;
}

.control-panel {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.control-panel button {
  font-family: 'VT323', monospace;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.1s;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
}

.control-panel button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}

.power-btn {
  background: #AA0000;
  color: white;
}

.power-btn.on {
  background: #00AA00;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3), 0 0 10px rgba(0,255,0,0.5);
}

.reset-btn {
  background: #666;
  color: white;
}

.reset-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.audio-btn, .scanline-btn {
  background: #555;
  color: white;
}

.audio-btn.on, .scanline-btn.on {
  background: #0055AA;
}

/* Boot Screens */
.boot-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-off {
  width: 100%;
  height: 100%;
  background: #000;
}

.color-bars {
  display: flex;
  width: 100%;
  height: 100%;
}

.kickstart-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #222 0%, #000 100%);
}

.kickstart-gradient {
  width: 200px;
  height: 50px;
  background: linear-gradient(90deg, #888, #FFF, #888);
  margin-bottom: 20px;
}

.kickstart-text {
  color: #FFF;
  font-size: 16px;
  letter-spacing: 2px;
}

.insert-disk-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #446688 0%, #224466 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hand-floppy {
  text-align: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.floppy-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.insert-text {
  color: #FFF;
  font-size: 24px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.click-hint {
  color: #AAA;
  font-size: 14px;
  margin-top: 10px;
}

.loading-screen {
  width: 100%;
  height: 100%;
  background: #0055AA;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-bar-container {
  width: 200px;
  height: 20px;
  background: #003366;
  border: 2px solid #FF8800;
}

.loading-bar {
  height: 100%;
  background: #FF8800;
  animation: loading 2s linear;
}

@keyframes loading {
  from { width: 0%; }
  to { width: 100%; }
}

.loading-text {
  color: #FFF;
  margin-top: 15px;
  font-size: 18px;
}

/* Workbench */
.workbench {
  width: 100%;
  height: 100%;
  background: #0055AA;
  display: flex;
  flex-direction: column;
}

.workbench-menu {
  height: 24px;
  background: linear-gradient(180deg, #FFFFFF 0%, #CCCCCC 100%);
  display: flex;
  align-items: center;
  padding: 0 5px;
  border-bottom: 2px solid #000;
  font-size: 14px;
}

.menu-item {
  padding: 2px 10px;
  cursor: pointer;
  position: relative;
}

.menu-item:hover, .menu-item.active {
  background: #0055AA;
  color: #FFF;
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  border: 2px solid #000;
  min-width: 150px;
  z-index: 2000;
}

.dropdown-item {
  padding: 4px 10px;
  color: #000;
  cursor: pointer;
}

.dropdown-item:hover:not(.separator) {
  background: #0055AA;
  color: #FFF;
}

.dropdown-item.separator {
  padding: 0;
  height: 1px;
  background: #888;
  cursor: default;
}

.menu-spacer {
  flex: 1;
}

.menu-right {
  color: #000;
  font-size: 12px;
}

.desktop {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Icons */
.amiga-icon {
  position: absolute;
  width: 70px;
  text-align: center;
  cursor: pointer;
  padding: 5px;
}

.amiga-icon.selected .icon-image,
.amiga-icon.selected .icon-label {
  background: #FF8800;
  color: #000;
}

.icon-image {
  font-size: 32px;
  padding: 5px;
  background: #0055AA;
}

.icon-label {
  font-size: 12px;
  color: #FFF;
  background: #0055AA;
  padding: 2px;
  margin-top: 2px;
  word-break: break-word;
}

/* Windows */
.amiga-window {
  position: absolute;
  background: #AAAAAA;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.window-titlebar {
  height: 20px;
  background: linear-gradient(90deg, #0055AA, #003388);
  display: flex;
  align-items: center;
  padding: 0 2px;
  cursor: move;
  border-bottom: 2px solid #000;
}

.window-close {
  width: 16px;
  height: 14px;
  background: #FF8800;
  border: 1px solid #000;
  cursor: pointer;
  margin-right: 5px;
}

.window-close:hover {
  background: #FFAA00;
}

.window-title {
  flex: 1;
  color: #FFF;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

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

.window-depth, .window-zoom {
  width: 16px;
  height: 14px;
  background: #888;
  border: 1px solid #000;
  cursor: pointer;
}

.window-content {
  padding: 5px;
  background: #888888;
  min-height: 50px;
  overflow: auto;
}

/* Boing Ball */
.boing-canvas {
  display: block;
  image-rendering: pixelated;
  width: 100%;
  height: auto;
}

/* Pixel Painter */
.pixel-painter {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.paint-canvas {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  cursor: crosshair;
  border: 2px solid #000;
}

.palette {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.palette-color {
  width: 16px;
  height: 16px;
  cursor: pointer;
  border: 1px solid #000;
}

.palette-color.selected {
  border: 2px solid #FFF;
  box-shadow: 0 0 5px #FFF;
}

/* Speak Amiga */
.speak-amiga {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.speech-bubble {
  background: #FFF;
  color: #000;
  padding: 15px;
  border-radius: 10px;
  font-size: 18px;
  text-align: center;
  min-width: 150px;
  position: relative;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: #FFF;
}

.speak-controls {
  display: flex;
  gap: 5px;
}

.speak-input {
  font-family: 'VT323', monospace;
  padding: 5px;
  border: 2px solid #000;
  background: #FFF;
  font-size: 14px;
  width: 150px;
}

.speak-btn {
  font-family: 'VT323', monospace;
  padding: 5px 15px;
  background: #FF8800;
  border: 2px solid #000;
  cursor: pointer;
}

/* Clock */
.amiga-clock {
  text-align: center;
  padding: 10px;
}

.clock-time {
  font-size: 32px;
  color: #33FF33;
  text-shadow: 0 0 10px #33FF33;
  font-family: 'VT323', monospace;
}

.clock-date {
  font-size: 14px;
  color: #AAFFAA;
  margin-top: 5px;
}

/* About */
.about-content {
  text-align: center;
  padding: 10px;
  color: #000;
}

.about-logo {
  font-size: 40px;
  margin-bottom: 10px;
}

.about-title {
  font-size: 24px;
  font-weight: bold;
  color: #0055AA;
}

.about-subtitle {
  font-size: 12px;
  font-style: italic;
  margin-bottom: 15px;
}

.about-specs {
  text-align: left;
  font-size: 12px;
  margin: 10px 0;
  padding: 10px;
  background: #AAAAAA;
}

.about-specs div {
  margin: 3px 0;
}

.about-quote {
  font-style: italic;
  color: #444;
  margin-top: 10px;
}

/* Floppy Selector */
.floppy-selector {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1500;
}

.disk-box {
  background: linear-gradient(180deg, #D4C8B0, #A09070);
  border: 3px solid #000;
  padding: 15px;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.3);
  position: relative;
}

.disk-box-title {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.disk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.floppy-disk {
  background: #222;
  color: #FFF;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  border: 2px solid #444;
  transition: all 0.1s;
}

.floppy-disk:hover {
  background: #333;
  border-color: #FF8800;
}

.disk-icon {
  font-size: 24px;
  margin-bottom: 5px;
}

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

.close-disk-box {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #AA0000;
  color: #FFF;
  border: none;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* Guru Meditation */
.guru-meditation {
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 8px solid #000;
}

.guru-meditation.flash {
  border-color: #CC0000;
}

.guru-box {
  background: #CC0000;
  padding: 15px 30px;
  text-align: center;
}

.guru-text {
  color: #FFF;
  font-size: 14px;
  line-height: 1.8;
  font-family: 'VT323', monospace;
}

/* Fun Fact */
.fun-fact {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 136, 0, 0.95);
  color: #000;
  padding: 15px 25px;
  border-radius: 5px;
  font-size: 14px;
  max-width: 300px;
  text-align: center;
  z-index: 2000;
  animation: fadeInOut 4s ease-in-out;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  10%, 90% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Footer */
.amiga-footer {
  margin-top: 20px;
  text-align: center;
  color: #888;
  font-size: 12px;
}

.amiga-footer a {
  color: #FF8800;
  text-decoration: none;
}

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

.disclaimer {
  opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .monitor-frame {
    padding: 10px;
  }

  .monitor-bezel {
    padding: 8px;
  }

  .crt-screen {
    min-height: 250px;
  }

  .computer-case {
    padding: 10px;
  }

  .case-top {
    flex-direction: column;
    gap: 10px;
  }

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

  .floppy-drive {
    width: 100px;
  }

  .control-panel button {
    padding: 6px 12px;
    font-size: 12px;
  }

  .workbench-menu {
    font-size: 11px;
  }

  .menu-right {
    display: none;
  }

  .amiga-icon {
    width: 60px;
  }

  .icon-image {
    font-size: 24px;
  }

  .icon-label {
    font-size: 10px;
  }

  .disk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .insert-text {
    font-size: 18px;
  }

  .floppy-icon {
    font-size: 60px;
  }

  .amiga-footer {
    font-size: 10px;
  }

  .disclaimer {
    display: block;
    margin-top: 5px;
  }
}