/* jQuery Terminal theme overrides for fsociety terminal */

/* --- Zoom intro overlay --- */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  overflow: hidden;
  background: #000;
}

.intro-overlay .intro-hint {
  position: absolute;
  top: 38%;
  left: 62%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #00ff41;
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  z-index: 1001;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(0,255,65,0.6);
  animation: hint-pulse 2s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.intro-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Screen center in image: ~64% from left, ~34% from top */
  transform-origin: 64% 34%;
  transform: scale(1);
  will-change: transform, opacity;
}

/* --- Zoom slider --- */
.zoom-slider-container {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1002;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.zoom-label {
  color: rgba(255,255,255,0.35);
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.zoom-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  height: 140px;
  width: 20px;
  accent-color: #008c23;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.zoom-slider:hover,
.zoom-slider:active {
  opacity: 1;
}

/* Load Source Code Pro locally or from system */
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Code Pro'), local('SourceCodePro-Regular');
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 500;
  src: local('Source Code Pro Medium'), local('SourceCodePro-Medium');
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 700;
  src: local('Source Code Pro Bold'), local('SourceCodePro-Bold');
}

/* Terminal container fills viewport */
.terminal, .terminal-output {
  background-color: #000 !important;
  color: #fff !important;
  font-family: 'Source Code Pro', 'Courier New', Courier, monospace !important;
}

/* Force consistent weight everywhere — override jQuery Terminal inline bold */
.terminal, .terminal *, .cmd, .cmd * {
  font-weight: 400 !important;
}

/* Preserve whitespace in terminal output */
.terminal .terminal-output div,
.terminal .terminal-output span,
.terminal .cmd span {
  white-space: pre !important;
}

/* Responsive font sizes matching original breakpoints */
.terminal {
  font-size: 11px !important;
  line-height: 15px !important;
  padding: 30px 25px 40px 25px !important;
  height: 100% !important;
}

@media screen and (min-width: 32em) {
  .terminal {
    font-size: 14px !important;
    line-height: 18px !important;
    padding: 45px 45px 50px 45px !important;
  }
}

@media screen and (min-width: 50em) {
  .terminal {
    font-size: 18px !important;
    line-height: 22px !important;
    padding: 70px 80px !important;
  }
}

/* Prompt styling — override jQuery Terminal's calc()-based font-size on .cmd */
.terminal .cmd {
  margin-top: 1.5em !important;
}
.terminal .cmd,
.terminal .cmd div,
.terminal .cmd span,
.terminal .cmd .cmd-prompt {
  font-size: inherit !important;
  color: #fff !important;
}


/* Cursor: blinking white block */
.terminal .cmd .cmd-cursor .cmd-cursor-line {
  background-color: #fff;
  color: #000;
}

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

.terminal .cmd .cmd-cursor.cmd-blink .cmd-cursor-line {
  animation: terminal-blink 1s infinite;
}

/* Color classes matching original */
.terminal .gn { color: #008c23; }
.terminal .bl { color: #2eafa7; }

/* Bold text */
.terminal strong { font-weight: 700; }

/* Error messages */
.terminal .error { color: #f00; }

/* Links in terminal output */
.terminal a {
  color: #2eafa7;
  text-decoration: none;
}
.terminal a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Remove default jQuery Terminal gutter/decorations */
.terminal .terminal-output > div {
  min-height: auto;
}

/* Home link stays above terminal */
.terminal-home-link {
  position: absolute;
  top: 12px;
  left: 15px;
  z-index: 50;
  color: #555;
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 12px;
  text-decoration: none;
}
.terminal-home-link:hover {
  color: #008c23;
}

/* Video overlay */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-overlay video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* YouTube overlay */
.youtube-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: #000;
}

.youtube-overlay .yt-close {
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 101;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 1px solid #555;
  padding: 5px 12px;
  cursor: pointer;
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 14px;
}

.youtube-overlay .yt-close:hover {
  border-color: #008c23;
  color: #008c23;
}

.youtube-overlay iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Image gallery overlay */
.gallery-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.gallery-overlay img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.gallery-overlay .gallery-nav {
  position: absolute;
  bottom: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.gallery-overlay .gallery-nav button {
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 1px solid #555;
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 14px;
  display: block;
  line-height: normal;
}

.gallery-overlay .gallery-nav button:hover {
  border-color: #008c23;
  color: #008c23;
}

.gallery-overlay .gallery-counter {
  color: #555;
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 14px;
}

.gallery-overlay .gallery-close {
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 101;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 1px solid #555;
  padding: 5px 12px;
  cursor: pointer;
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 14px;
  display: block;
  line-height: normal;
}

.gallery-overlay .gallery-close:hover {
  border-color: #008c23;
  color: #008c23;
}

/* --- Mobile adjustments --- */

/* Portrait phones: show full image (no crop), center hint below image */
@media screen and (max-width: 32em) {
  .intro-image {
    object-fit: contain;
    transform-origin: center;
  }
  .intro-overlay .intro-hint {
    left: 50%;
    top: auto;
    bottom: 20%;
  }
  .zoom-slider {
    width: 44px;
    height: 180px;
    opacity: 0.8;
  }
  .gallery-overlay .gallery-nav button {
    padding: 12px 24px;
    font-size: 16px;
  }
  .gallery-overlay .gallery-close,
  .youtube-overlay .yt-close {
    padding: 10px 16px;
    font-size: 16px;
  }
}

/* Landscape phones: show full image, hint near bottom */
@media screen and (max-height: 30em) and (orientation: landscape) {
  .intro-image {
    object-fit: contain;
    transform-origin: center;
  }
  .intro-overlay .intro-hint {
    left: 50%;
    top: auto;
    bottom: 5%;
  }
}

/* Reduce padding on very small screens so ~40-char lines fit */
@media screen and (max-width: 22em) {
  .terminal {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}
