@import url('https://fonts.googleapis.com/css2?family=VT323&family=Orbitron:wght@400;700&display=swap');

html, body {
  background: #000000;
  color: #00FF41;
  font-family: 'VT323', 'Courier New', monospace;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image: 
    linear-gradient(rgba(0, 255, 65, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  overflow-y: auto;
  animation: terminalBoot 0.8s ease-out;
}

/* Scrollbar - matches your Janitor profile */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000000; border-left: 2px solid #003B00; }
::-webkit-scrollbar-thumb { 
  background: #00FF41; 
  border: 2px solid #000000; 
  box-shadow: 0 0 8px #00FF41, inset 0 0 4px #00FF41; 
}
::-webkit-scrollbar-thumb:hover { background: #22ff66; box-shadow: 0 0 12px #22ff66; }
html { scrollbar-width: thin; scrollbar-color: #00FF41 #000000; }

/* CRT + scanlines from your profile */
.crt::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0px, rgba(0,0,0,0.2) 2px, transparent 4px),
              repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0, 255, 65, 0.02) 3px, rgba(0, 255, 65, 0.02) 6px);
  pointer-events: none;
  z-index: 50;
  animation: flicker 0.15s infinite alternate, datastream 30s linear infinite;
}
@keyframes flicker { 0% { opacity: 0.95; } 5% { opacity: 0.6; } 100% { opacity: 1; } }
@keyframes datastream { 0% { background-position: 0 0; } 100% { background-position: 100vw 0; } }
@keyframes terminalBoot { 0% { opacity: 0; filter: brightness(2); } 100% { opacity: 1; filter: brightness(1); } }

/* Neon title - uses Orbitron + your glow */
.neon-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 5.2rem;
  line-height: 0.9;
  text-shadow: 0 0 8px #00FF41, 0 0 16px #00FF41, 0 0 30px #00FF41;
  animation: glow-pulse 3s ease-in-out infinite alternate, flicker 5s infinite;
}
@keyframes glow-pulse {
  from { text-shadow: 0 0 8px #00FF41, 0 0 16px #00FF41; }
  to { text-shadow: 0 0 16px #00FF41, 0 0 30px #00FF41, 0 0 50px #00FF41; }
}

/* Terminal box */
.terminal-box {
  border: 1px solid #003B00;
  background: rgba(0, 26, 0, 0.8);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.2), inset 0 0 30px rgba(0, 255, 65, 0.08);
  padding: 1rem;
  max-width: 620px;
}

/* Navigation */
.nav-link {
  color: #aa00ff;
  transition: all 0.2s;
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
}
.nav-link:hover {
  color: #00FF41;
  text-shadow: 0 0 12px #00FF41;
}

/* === AWAKENED FLIP CARDS (matches your Janitor profile cards) === */
.flip-card {
  perspective: 1200px;
  height: 560px;
  width: 100%;
  max-width: 320px;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 1px solid rgba(0, 255, 65, 0.28);
  background: rgba(0, 8, 0, 0.95);
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.12), inset 0 0 18px rgba(0, 255, 65, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.flip-card-back {
  transform: rotateY(180deg);
  background: #1a0a0a;
  border-color: #ff0044;
}

.bot-header {
  position: relative;
  height: 260px;
  background: #000;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 255, 65, 0.28);
  flex-shrink: 0;
}
.bot-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: brightness(0.9) contrast(1.08) saturate(0.85);
}
.bot-header:hover img {
  transform: scale(1.035);
  filter: brightness(1.02) contrast(1.12) saturate(1);
}
.bot-header::after {
  content: "CREW FILE";
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 255, 65, 0.35);
  color: #9affd8;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 6px #00FF41;
  pointer-events: none;
}

.front-content {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: space-between;
}
.dossier {
  padding: 8px 0;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #cfeee8;
  text-shadow: 0 0 7px rgba(0, 255, 65, 0.5);
}
.dossier .warning { color: #00FF41; font-weight: bold; }

.janitor-btn {
  display: inline-block;
  margin: 8px auto;
  padding: 6px 16px;
  border: 2px solid #aa00ff;
  color: #aa00ff;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 6px #00FF41;
  transition: all 0.3s ease;
  background: transparent;
}
.janitor-btn:hover {
  background: #00FF41;
  color: #000000;
  border-color: #00FF41;
  box-shadow: 0 0 20px #00FF41;
  text-shadow: none;
}

/* Tags - exact match to your Janitor profile tag style */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 255, 65, 0.18);
  margin-top: auto;
}
.tag {
  background: rgba(0, 255, 180, 0.08);
  border: 1px solid rgba(0, 255, 180, 0.35);
  color: #9ed9cf;
  font-family: 'VT323', monospace;
  font-size: 0.58rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  text-transform: uppercase;
  box-shadow: inset 0 0 4px rgba(0,255,180,0.15);
  transition: all 0.2s;
}
.tag:hover {
  background: rgba(0, 255, 200, 0.15);
  border-color: rgba(120,255,230,0.55);
  color: #e0fffb;
}

/* Back side */
.flip-card-back .dossier {
  padding: 16px;
  overflow-y: auto;
  height: 100%;
  font-size: 0.9rem;
}
  height: calc(100% - 260px);
  overflow-y: auto;
  text-shadow: 0 0 7px rgba(0, 255, 65, 0.5);
}
.dossier .warning { color: #00FF41; font-weight: bold; }

/* Janitor-style glowing button */
.janitor-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 16px;
  border: 2px solid #aa00ff;
  color: #aa00ff;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 6px #00FF41;
  transition: all 0.3s ease;
  background: transparent;
}
.janitor-btn:hover {
  background: #00FF41;
  color: #000000;
  border-color: #00FF41;
  box-shadow: 0 0 20px #00FF41;
  text-shadow: none;
}

/* Warning / quote colors from your profile */
.warning-text { color: #00FF41; }
.quote { color: #ff8866; }

/* === GALLERY & LIGHTBOX (matches your Janitor profile aesthetic) === */
.nostromo-image-grid-panel {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #003B00;
  background: rgba(0, 0, 0, 0.82);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.16), inset 0 0 24px rgba(0, 255, 65, 0.06);
}

.nostromo-image-grid-panel::before {
  content: "VISUAL ARCHIVE // IMAGE GRID";
  display: block;
  margin-bottom: 16px;
  color: #00FF41;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: left;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.55);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 65, 0.28);
  background: #000;
  cursor: pointer;
  transition: all 0.3s ease;
  aspect-ratio: 4 / 3;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 25px rgba(0, 255, 65, 0.5);
  border-color: #00FF41;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s ease;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* Lightbox */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.97);
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.modal-content {
  position: relative;
  max-width: 92%;
  max-height: 92vh;
  animation: flicker 4s infinite;
}

.modal-content img {
  max-width: 100%;
  max-height: 88vh;
  border: 3px solid #00FF41;
  box-shadow: 0 0 60px #00FF41, inset 0 0 40px rgba(0, 255, 65, 0.2);
  image-rendering: crisp-edges;
}

.close {
  position: absolute;
  top: -50px;
  right: 10px;
  color: #00FF41;
  font-size: 42px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 0 0 12px #00FF41;
  line-height: 30px;
}

.close:hover {
  color: #ff0044;
  text-shadow: 0 0 12px #ff0044;
}

#modalCaption {
  color: #9affd8;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
  margin-top: 12px;
}
/* === SIGNAL NETWORK / ALLIES (matches your Janitor profile creator cards) === */
.nostromo-creator-panel {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #003B00;
  background: rgba(0, 0, 0, 0.82);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.16), inset 0 0 24px rgba(0, 255, 65, 0.06);
}

.nostromo-creator-panel::before {
  content: "SIGNAL RELAY // VALUED CREATORS";
  display: block;
  margin-bottom: 16px;
  color: #00FF41;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: left;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.55);
}

.creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.nostromo-creator-link {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(0, 255, 65, 0.28);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.12), inset 0 0 14px rgba(0, 255, 65, 0.04);
  text-decoration: none;
  transition: all 0.25s ease;
}

.nostromo-creator-link:hover {
  transform: translateY(-4px);
  border-color: #00FF41;
  box-shadow: 0 0 25px rgba(0, 255, 65, 0.4);
}

.nostromo-creator-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) brightness(0.9) saturate(0.85);
  transition: all 0.4s ease;
}

.nostromo-creator-link:hover img {
  transform: scale(1.07);
  filter: contrast(1.18) brightness(1.05) saturate(0.95);
}

.creator-signal-label {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: linear-gradient(90deg, rgba(0,0,0,0.9), rgba(0,26,0,0.8));
  border-top: 1px solid rgba(0, 255, 65, 0.35);
  color: #9affd8;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 6px 4px;
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.6);
  transition: all 0.2s ease;
}

.nostromo-creator-link:hover .creator-signal-label {
  opacity: 1;
  background: rgba(0, 26, 0, 0.95);
}

/* Constrained Creator Modal (720px max — change this number if you want bigger/smaller) */
#creatorModal .modal-content {
  position: relative;
  max-width: 740px;
  animation: flicker 4s infinite;
}

#creatorModal .modal-content img {
  max-width: 720px;
  max-height: 720px;
  width: auto;
  height: auto;
  border: 3px solid #00FF41;
  box-shadow: 0 0 60px #00FF41, inset 0 0 40px rgba(0, 255, 65, 0.2);
  image-rendering: crisp-edges;
  display: block;
  margin: 0 auto;
}

#modalCreatorName {
  color: #00FF41;
  text-align: center;
  margin: 12px 0 8px;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-shadow: 0 0 8px #00FF41;
}

#modalProfileLink {
  margin: 8px auto 0;
  display: block;
  text-align: center;
}
  box-shadow: 0 0 25px rgba(0, 255, 65, 0.4);
}

.nostromo-creator-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) brightness(0.9) saturate(0.85);
  transition: all 0.4s ease;
}

.nostromo-creator-link:hover img {
  transform: scale(1.07);
  filter: contrast(1.18) brightness(1.05) saturate(0.95);
}

.creator-signal-label {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: linear-gradient(90deg, rgba(0,0,0,0.9), rgba(0,26,0,0.8));
  border-top: 1px solid rgba(0, 255, 65, 0.35);
  color: #9affd8;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 6px 4px;
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.6);
  transition: all 0.2s ease;
}

.nostromo-creator-link:hover .creator-signal-label {
  opacity: 1;
  background: rgba(0, 26, 0, 0.95);
}

/* Reuse the same modal styles from Gallery (lightly adjusted caption) */
#modalProfileLink {
  margin-top: 16px;
  display: inline-block;
}