* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Color scheme variables */
body.grey {
  --bg-color: #000;
  --text-color: #fff;
  --border-color: #fff;
  --hover-bg: #222;
  --card-bg: #1a1a1a;
  --label-color: #ccc;
  --glow-color: rgba(255, 255, 255, 0.1);
  --scanline-color: rgba(255, 255, 255, 0.03);
  --button-bg: #fff;
  --button-text: #000;
  --button-hover: #ccc;
  --error-color: #f00;
}

body.orange {
  --bg-color: #0a0500;
  --text-color: #ff9933;
  --border-color: #ff9933;
  --hover-bg: #1a0f00;
  --card-bg: #050200;
  --label-color: #cc7722;
  --glow-color: rgba(255, 153, 51, 0.15);
  --scanline-color: rgba(255, 153, 51, 0.03);
  --button-bg: #ff9933;
  --button-text: #0a0500;
  --button-hover: #ff7700;
  --error-color: #ff3300;
}

body.green {
  --bg-color: #000;
  --text-color: #00ff00;
  --border-color: #00ff00;
  --hover-bg: #001a00;
  --card-bg: #001100;
  --label-color: #00cc00;
  --glow-color: rgba(0, 255, 0, 0.15);
  --scanline-color: rgba(0, 255, 0, 0.03);
  --button-bg: #00ff00;
  --button-text: #000;
  --button-hover: #00cc00;
  --error-color: #ff0000;
}

body.blue {
  --bg-color: #001a33;
  --text-color: #ffffff;
  --border-color: #4da6ff;
  --hover-bg: #002244;
  --card-bg: #001122;
  --label-color: #99ccff;
  --glow-color: rgba(77, 166, 255, 0.15);
  --scanline-color: rgba(77, 166, 255, 0.03);
  --button-bg: #4da6ff;
  --button-text: #001a33;
  --button-hover: #3385cc;
  --error-color: #ff4444;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Courier New', monospace;
  padding: 20px;
  line-height: 1.6;
}

.terminal-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.terminal-header-left {
  flex: 1;
}

.terminal-header-right {
  flex-shrink: 0;
  text-align: right;
  min-width: 300px;
}

.terminal-info {
  font-size: 14px;
  margin-bottom: 5px;
  text-shadow: 0 0 10px var(--text-color), 0 0 20px var(--text-color);
}

.terminal-header h1 {
  font-size: 28px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px var(--text-color);
}

.terminal-header p {
  font-size: 16px;
  margin-bottom: 10px;
}

.terminal-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-top: 10px;
}

.terminal-link:hover {
  text-shadow: 0 0 10px var(--text-color);
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.job-card {
  border: 2px solid var(--border-color);
  padding: 20px;
  background-color: var(--card-bg);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.job-card-clickable:hover {
  background-color: var(--hover-bg);
  box-shadow: 0 0 20px var(--border-color);
}

.job-emblem {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 72px;
  height: 72px;
  z-index: 0;
}

.job-emblem img {
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

body.grey .job-emblem img {
  filter: invert(100%);
}

body.orange .job-emblem img {
  filter: invert(71%) sepia(85%) saturate(1500%) hue-rotate(350deg) brightness(100%);
}

body.green .job-emblem img {
  filter: invert(71%) sepia(85%) saturate(3000%) hue-rotate(80deg) brightness(100%);
}

body.blue .job-emblem img {
  filter: invert(71%) sepia(42%) saturate(1500%) hue-rotate(180deg) brightness(100%);
}

/* Shared emblem styles for jobs and factions */
.faction-emblem {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 68px;
  height: 68px;
  z-index: 0;
}

.job-emblem img,
.faction-emblem img {
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

/* Color scheme filters for all emblems and currency icons */
body.grey .job-emblem img,
body.grey .faction-emblem img,
body.grey .job-list-emblem img,
body.grey .job-details-emblem img {
  filter: invert(100%);
}

body.orange .job-emblem img,
body.orange .faction-emblem img,
body.orange .job-list-emblem img,
body.orange .job-details-emblem img,
body.orange .currency-icon {
  filter: invert(71%) sepia(85%) saturate(1500%) hue-rotate(350deg) brightness(100%);
}

body.green .job-emblem img,
body.green .faction-emblem img,
body.green .job-list-emblem img,
body.green .job-details-emblem img,
body.green .currency-icon {
  filter: invert(71%) sepia(85%) saturate(3000%) hue-rotate(80deg) brightness(100%);
}

body.blue .job-emblem img,
body.blue .faction-emblem img,
body.blue .job-list-emblem img,
body.blue .job-details-emblem img {
  filter: invert(71%) sepia(42%) saturate(1500%) hue-rotate(180deg) brightness(100%);
}

.job-card-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.job-card-header h2 {
  font-size: 20px;
  margin-bottom: 5px;
  padding-right: 80px;
  text-shadow: 0 0 5px var(--text-color);
}

.job-rank {
  font-size: 20px;
  color: var(--text-color);
  text-shadow: 0 0 5px var(--text-color);
  display: flex;
  gap: 0;
}

.job-rank .star {
  display: inline-block;
  width: 1em;
  text-align: center;
}

.job-field {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.field-label {
  color: var(--label-color);
  font-weight: bold;
  margin-bottom: 3px;
  font-size: 12px;
}

.field-value {
  color: var(--text-color);
  padding-left: 10px;
  font-size: 14px;
  white-space: pre-wrap;
}

.field-value--payment {
  display: inline-flex;
  align-items: center;
}


/* Blinking cursor effect - only for landing page headings */
.landing-container h1::after,
.landing-container p::after {
  content: '';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Scanline effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    var(--scanline-color) 0px,
    var(--scanline-color) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 1000;
}

/* Screen glow */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--glow-color) 0%, transparent 70%);
  pointer-events: none;
  z-index: 999;
}
