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

:root {
  /* CRT Terminal Theme - Phosphor Green on Black */
  --crt-green: hsl(123, 100%, 50%);
  --crt-green-dim: hsl(123, 100%, 35%);
  --crt-green-bright: hsl(123, 100%, 65%);
  --crt-bg: hsl(0, 0%, 2%);
  --terminal-text: hsl(123, 100%, 50%);
  --terminal-link: hsl(123, 100%, 50%);
}

body {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 20px;
  background: var(--crt-bg);
  color: var(--terminal-text);
  overflow: hidden;
  line-height: 1.4;
}

/* CRT Screen Effects */
.crt-screen {
  position: relative;
  background: var(--crt-bg);
  overflow: hidden;
}

.crt-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(0, 0, 0, 0.5) 51%
  );
  background-size: 100% 2px;
  pointer-events: none;
  z-index: 10;
  animation: scanlines 8s linear infinite;
}

.crt-screen::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 30%,
    transparent 70%,
    rgba(255, 255, 255, 0.03) 100%
  );
  pointer-events: none;
  z-index: 11;
}

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

.crt-curve {
  border-radius: 8px;
  box-shadow: 
    inset 0 0 100px rgba(0, 255, 65, 0.1),
    0 0 50px rgba(0, 0, 0, 0.8);
}

.crt-glow {
  text-shadow: 
    0 0 5px var(--crt-green),
    0 0 10px var(--crt-green),
    0 0 20px var(--crt-green);
}

.crt-flicker {
  animation: flicker 0.15s infinite alternate;
}

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

/* Terminal Text */
.terminal-text {
  color: var(--terminal-text);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.terminal-link {
  color: var(--terminal-link);
  text-decoration: none;
  transition: all 0.2s ease;
}

.terminal-link:hover {
  text-decoration: underline;
  text-shadow: 
    0 0 5px var(--crt-green),
    0 0 10px var(--crt-green),
    0 0 15px var(--crt-green);
}

/* Modem Reveal Animation */
.modem-reveal {
  animation: modemReveal 6.5s steps(50) forwards;
  opacity: 0;
}

@keyframes modemReveal {
  0% { 
    opacity: 0;
    clip-path: inset(0 0 100% 0);
  }
  100% { 
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

.modem-scanline {
  position: relative;
  overflow: hidden;
}

.modem-scanline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--crt-green) 50%,
    transparent
  );
  opacity: 0.8;
  animation: scanlineMove 6.5s ease-in-out forwards;
  z-index: 10;
}

@keyframes scanlineMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(100vh); }
}

/* Layout */
.main-container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: black;
}

.transmission-screen {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-screen {
  width: 100%;
  height: 100vh;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
  max-width: 72rem;
}

.image-container {
  width: 75%;
  flex-shrink: 0;
  margin: 0 auto;
}

.image-container img {
  width: 100%;
  height: auto;
  opacity: 0;
}

.text-container {
  position: relative;
  flex: 1;
}

.text-content {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.7rem;
  line-height: 1.3;
}

/* Responsive Design */
@media (min-width: 640px) {
  .text-content {
    font-size: 0.75rem;
  }
}

@media (min-width: 768px) {
  .content-screen {
    padding: 2rem;
  }
  
  .content-wrapper {
    flex-direction: row;
  }
  
  .image-container {
    width: 12rem;
    order: 2;
    margin: 0;
  }
  
  .text-container {
    order: 1;
  }
  
  .text-content {
    font-size: 0.875rem;
  }
}

@media (min-width: 1024px) {
  .content-screen {
    padding: 3rem;
  }
  
  .image-container {
    width: 14rem;
  }
  
  .text-content {
    font-size: 1rem;
  }
}

@media (min-width: 1280px) {
  .image-container {
    width: 16rem;
  }
  
  .text-content {
    font-size: 1.125rem;
  }
}

/* Transmission Text */
.transmission-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.5rem;
  white-space: pre-wrap;
}

@media (min-width: 480px) {
  .transmission-text {
    font-size: 2rem;
  }
}

@media (min-width: 640px) {
  .transmission-text {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  .transmission-text {
    font-size: 4rem;
  }
}

@media (min-width: 1024px) {
  .transmission-text {
    font-size: 5rem;
  }
}

/* Simple Pages */
.simple-page {
  margin: 0;
  padding: 8px;
  font-family: monospace;
  color: #333;
  background: white;
}

/* 404 Page */
.error-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
}

.error-content {
  text-align: center;
}

.error-title {
  margin-bottom: 1rem;
  font-size: 2.25rem;
  font-weight: bold;
  color: #111;
}

.error-message {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: #4b5563;
}

.error-link {
  color: #3b82f6;
  text-decoration: underline;
}

.error-link:hover {
  color: #1d4ed8;
}
