* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
}

body {
  background-color: #000000;
  color: #FFFFFF;
  overflow: hidden;
  position: relative;
}

/* CRT scanline effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  z-index: 100;
  pointer-events: none;
  animation: scanline 10s linear infinite;
}

/* Subtle CRT flicker */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0);
  z-index: 110;
  pointer-events: none;
  animation: flicker 5s infinite;
}

@keyframes flicker {
  0% { background-color: rgba(0,0,0,0); }
  5% { background-color: rgba(0,0,0,0.02); }
  10% { background-color: rgba(0,0,0,0); }
  15% { background-color: rgba(0,0,0,0.04); }
  30% { background-color: rgba(0,0,0,0); }
  50% { background-color: rgba(0,0,0,0.03); }
  80% { background-color: rgba(0,0,0,0); }
  95% { background-color: rgba(0,0,0,0.05); }
  100% { background-color: rgba(0,0,0,0); }
}

#app {
  display: grid;
  grid-template-columns: 1fr 400px;
  grid-template-rows: 80px 1fr 80px;
  height: 100vh;
  padding: 10px;
  grid-gap: 10px;
}

header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #333;
  padding: 10px;
  background-color: rgba(0,0,0,0.5);
}

.logo {
  color: #FF4800;
  font-weight: bold;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

.logo::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 20px solid #FF4800;
  margin-right: 10px;
}

.status {
  color: #00FFFF;
  font-size: 0.9rem;
  animation: blink 2s infinite;
}

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

.time {
  color: #FFFFFF;
}

main {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  border: 1px solid #333;
  background-color: rgba(20, 20, 20, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}

#sphere-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.sphere-and-target-wrapper {
  position: absolute;
  top: 50%; /* Adjust this value to move both elements up/down */
  left: 70%; /* Adjust this value to move both elements left/right */
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#threejs-container {
  width: 100%;
  height: 100%;
}

aside {
  grid-column: 2;
  grid-row: 2;
  border: 1px solid #333;
  background-color: rgba(20, 20, 20, 0.7);
  padding: 15px;
  overflow: hidden;
  position: relative;
}

.data-panel {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #FF4800 #111;
  padding-right: 10px;
}

.data-panel::-webkit-scrollbar {
  width: 8px;
}

.data-panel::-webkit-scrollbar-track {
  background: #111;
}

.data-panel::-webkit-scrollbar-thumb {
  background-color: #FF4800;
}

.data-section {
  margin-bottom: 20px;
}

.data-section h3 {
  color: #FF4800;
  margin-bottom: 10px;
  border-bottom: 1px solid #FF4800;
  padding-bottom: 3px;
  font-size: 1rem;
}

.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  margin-bottom: 15px;
}

.data-item {
  display: flex;
  justify-content: space-between;
}

.data-label {
  color: #AAAAAA;
  font-size: 0.8rem;
}

.data-value {
  color: #00FFFF;
  font-size: 0.8rem;
}

.data-link {
  color: #00FFFF;  /* Same color as .data-value */
  text-decoration: none;
}

.data-link:hover {
  text-decoration: underline;
}

.warning {
  color: #FF4800;
  margin-top: 10px;
  font-size: 0.9rem;
  animation: warning-blink 1s infinite;
}

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

.status-bar {
  height: 20px;
  background-color: #111;
  margin: 10px 0;
  position: relative;
  overflow: hidden;
}

.status-fill {
  height: 100%;
  background-color: #00FFFF;
  width: 75%;
  position: relative;
  animation: pulse 4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; width: 75%; }
  50% { opacity: 0.8; width: 77%; }
}

.hexagon-grid {
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
}

.hexagon {
  width: 30px;
  height: 35px;
  background-color: transparent;
  position: relative;
  border: 1px solid #00FFFF;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: all 0.3s ease;
}

.hexagon.active {
  background-color: rgba(0, 255, 255, 0.3);
}

.terminal {
  font-family: 'Courier New', monospace;
  color: #00FFFF;
  font-size: 0.7rem;
  line-height: 1.2;
  margin-top: 15px;
  height: 150px;
  overflow: hidden;
  position: relative;
}

.terminal-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  animation: scroll 20s linear infinite;
}

@keyframes scroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-300px); }
}

footer {
  grid-column: 1 / -1;
  grid-row: 3;
  border: 1px solid #333;
  background-color: rgba(20, 20, 20, 0.7);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.command-line {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.command-prompt {
  color: #FF4800;
  margin-right: 10px;
}

.command-input {
  background-color: transparent;
  border: none;
  color: #00FFFF;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  width: 100%;
  outline: none;
}

.sine-wave {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 20px;
  overflow: hidden;
}

.grid-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -1;
}

.h-line {
  position: absolute;
  height: 1px;
  width: 100%;
  background-color: rgba(50, 50, 50, 0.5);
}

.v-line {
  position: absolute;
  width: 1px;
  height: 100%;
  background-color: rgba(50, 50, 50, 0.5);
}

/* Hebrew characters scattered around */
.hebrew-char {
  position: absolute;
  color: rgba(255, 72, 0, 0.4);
  font-size: 14px;
  z-index: 0;
}

.personal-log-btn {
  color: #FF4800;
  text-decoration: none;
  border: 1px solid #FF4800;
  padding: 8px 16px;
  font-size: 0.9rem;
  background-color: transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.personal-log-btn::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -2px;
  right: -2px;
  bottom: -8px;
  border: 2px solid #FF4800;
  border-radius: 2px;
  animation: pulse-glow 2s infinite;
  opacity: 0;
}

@keyframes pulse-glow {
  0% {
    transform: scale(1);
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.personal-log-btn:hover {
  background-color: rgba(255, 72, 0, 0.2);
  color: #00FFFF;
  border-color: #00FFFF;
}

.personal-log-btn:hover::after {
  border-color: #00FFFF;
}

/* Add media query for mobile devices */
@media screen and (max-width: 768px) {
  @keyframes pulse-glow {
    0% {
      transform: scale(1);
      opacity: 0;
    }
    50% {
      opacity: 0.3;
    }
    100% {
      transform: scale(1.1);
      opacity: 0;
    }
  }

  #app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .status-bar {
    display: none;
  }

  aside {
    grid-row: 2;
    grid-column: 1;
    overflow-y: auto;
    height: auto;
    padding-bottom: 20px;
  }

  .data-panel {
    height: auto;
    overflow-y: visible;
  }

  .terminal {
    height: 120px;
    margin-bottom: 20px;
  }

  footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background-color: rgba(20, 20, 20, 0.95);
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .status {
    margin-top: 10px;
  }

  /* Hide desktop sphere */
  #app > main {
    display: none;
  }

  .command-prompt::before {
    content: "";
  }
}

/* Add this for desktop only */
@media screen and (min-width: 769px) {
  footer {
    padding-right: 126px;
  }
  
  .command-prompt::before {
    content: "NEUROCHEMICAL ";
  }
}

.video-call-container {
  position: absolute;
  top: 30px;
  left: 30px;
  width: 384px;
  height: 250px;
  transform: skew(-5deg, 0);
  z-index: 10;
}

.video-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 72, 0, 0.7);
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  box-shadow: 0 0 15px rgba(255, 72, 0, 0.2);
}

.call-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: skew(5deg, 0) scale(1.2);
  transform-origin: center center;
}

.frame-decorators .corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 72, 0, 0.7);
}

.corner.top-left {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.corner.top-right {
  top: -2px;
  right: -2px;
  border-left: none;
  border-bottom: none;
}

.corner.bottom-left {
  bottom: -2px;
  left: -2px;
  border-right: none;
  border-top: none;
}

.corner.bottom-right {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.call-status {
  position: absolute;
  bottom: -25px;
  left: 10px;
  color: rgba(255, 72, 0, 0.9);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: rgba(255, 72, 0, 0.9);
  border-radius: 50%;
  animation: blink 2s infinite;
}

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

.model-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.model-container iframe {
  width: 400%;
  height: 160%;
  background: transparent;
  position: relative;
  left: -150%;
  top: -10%;
  pointer-events: none;
}
