body,
html {
  height: 100%;
  margin: 0;
  background-color: #000000;
  color: #ffffff;
  font-family: monospace;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #2dbd6e;
  color: #000;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* For screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 1vh 2vw;
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
}

header {
  width: 100%;
  padding: 1rem 0;
}

header h1 {
  margin: 0 0 0.5rem;
  color: #2dbd6e;
  font-size: 2rem;
}

header .tagline {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

main {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

footer {
  width: 100%;
  padding: 1rem 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

footer a {
  color: #2dbd6e;
  text-decoration: none;
}

footer a:hover, 
footer a:focus {
  text-decoration: underline;
}

.upper-content {
  display: flex;
  width: 100%;
  height: 65%;
  max-height: 65vh;
  gap: 2vw;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.image-container {
  flex: 1;
  min-width: 300px;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#random-image {
  max-width: 100%;
  max-height: 70vh; /* Limit maximum height on desktop screens */
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(50, 50, 50, 0.3);
  object-fit: contain;
  width: auto;
  height: auto;
}

.info-section {
  flex: 1;
  min-width: 300px;
  max-width: 550px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-box {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid #2dbd6e;
  border-radius: 8px;
  padding: 15px 25px;
  text-align: left;
  line-height: 1.6;
  box-shadow: 0 0 10px rgba(45, 189, 110, 0.3);
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 80%;
}

.blurb-title {
  color: #2dbd6e;
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 8px;
}

.blurb-content {
  color: #cccccc;
  font-size: 1em;
}

.controls {
  margin-top: 2vh;
  margin-bottom: 2vh;
}

button {
  background-color: #2dbd6e;
  color: #000000;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-family: monospace;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background-color: #22a35f;
  box-shadow: 0 0 10px rgba(45, 189, 110, 0.5);
}

/* Terminal console styles */
.terminal-container {
  width: 100%;
  height: 25vh;
  background-color: #0c0c0c;
  border: 2px solid #2dbd6e;
  border-radius: 6px;
  padding: 0;
  margin-bottom: 1vh;
  overflow: hidden;
  font-family: "Courier New", monospace;
  position: relative;
  box-sizing: border-box;
}

.terminal-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: #2dbd6e;
  color: #000;
  padding: 4px 10px;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
}

.terminal-controls {
  display: flex;
}

.terminal-button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 8px;
  background-color: #000;
  border: 1px solid #000;
}

.terminal-content {
  margin-top: 25px;
  height: calc(100% - 25px);
  overflow-y: auto;
  color: #2dbd6e;
  font-size: 14px;
  line-height: 1.3;
  padding: 5px 10px;
  box-sizing: border-box;
}

.terminal-line {
  padding: 2px 0;
  display: flex;
}

.terminal-prompt {
  color: #2dbd6e;
  margin-right: 8px;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: #2dbd6e;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    height: auto;
    overflow-y: auto;
    padding: 10px;
  }
  
  .upper-content {
    flex-direction: column;
    height: auto;
    max-height: none;
    margin-bottom: 15px;
    gap: 15px;
  }

  .image-container,
  .info-section {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
  }

  .image-container {
    max-height: 40vh;
  }
  
  #random-image {
    min-height: auto;
    max-height: 40vh;
  }

  .info-section {
    max-height: none;
  }

  .info-box {
    max-height: none;
    margin-bottom: 10px;
  }

  .terminal-container {
    height: 30vh;
    margin-top: 10px;
  }
}

@media (max-height: 700px) {
  .blurb-title {
    font-size: 1em;
    margin-bottom: 4px;
  }

  .blurb-content {
    font-size: 0.9em;
    line-height: 1.4;
  }

  .terminal-content {
    font-size: 12px;
    line-height: 1.2;
  }
}