:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #05060a;
  color: #f5f5f5;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  /* align-items: center;  <-- REMOVED THIS (caused the jumping) */
  align-items: flex-start; /* Starts items from the top */
  justify-content: center;
  
  /* Add a fixed gap at the top so it never sticks to the edge */
  padding-top: 5rem; 
  padding-bottom: 5rem; /* Symmetry for scrolling */
  box-sizing: border-box;
}

.app {
  max-width: 960px;
  width: 100%;
  padding: 1.5rem;
  box-sizing: border-box;
}

.card {
  background: radial-gradient(
    circle at top left,
    #272b3d 0,
    #141622 40%,
    #05060a 100%
  );
  border-radius: 14px;
  padding: 1.4rem 1.7rem 1.2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid #262a3a;
}

h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.subtitle {
  margin: 0 0 1rem 0;
  color: #a9b1d0;
  font-size: 0.95rem;
}

/* Update the main container to push button to the right */
.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between; /* This pushes the button to the far right */
  margin-bottom: 1rem;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  background: rgba(4, 5, 10, 0.7);
  border: 1px solid #2a3146;
}

/* New wrapper for the "Campaign: Dropdown" area */
.selector-group {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between text and box */
}

/* Style for the "Campaign:" text */
.selector-label {
  color: #a0a6c0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  background: linear-gradient(135deg, #ff6b3c, #ffb347);
  color: #141414;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out,
    filter 0.12s;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.6);
}

button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.hint {
  font-size: 0.8rem;
  color: #7d859e;
  margin-left: auto;
}

.keywords {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  margin-top: 0.3rem;
}

.keyword-card {
  background: rgba(9, 11, 20, 0.9);
  border-radius: 10px;
  border: 1px solid #303853;
  padding: 0.5rem 0.7rem;
}

.keyword-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8892b8;
  margin-bottom: 0.1rem;
}

.keyword-value {
  font-size: 0.96rem;
  font-weight: 600;
}

.keyword-desc {
  font-size: 0.78rem;
  color: #aeb4d4;
  margin-top: 0.15rem;
  min-height: 2.4em; 
  line-height: 1.2;

}

.scenario {
  margin-top: 0.7rem;
  padding-top: 0.9rem;
  border-top: 1px solid #262a3a;
}

.scenario-header-block {
  background: rgba(7, 9, 20, 0.95);
  border-radius: 12px;
  border: 1px solid #3a2748;
  padding: 0.9rem 1rem 0.75rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}

.scenario-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.scenario-title {
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0;
  padding-bottom: 0.1rem;
  border-bottom: 2px solid #e238a7;
}

.scenario-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #6a2bcf 0%, #b04bff 100%);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 0 8px rgba(176, 75, 255, 0.4);
  transition: all 0.25s ease;
}

.ferryman-block {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.ferryman-portrait img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%; /* tweak this number to move up/down */
  filter: grayscale(100%);
  box-shadow: 0 0 0 2px #e238a750, 0 0 10px rgba(0, 0, 0, 0.8);
}

.ferryman-quote-box {
  flex: 1 1 auto;
}

.ferryman-quote {
  font-size: 0.9rem;
  color: #f1e6ff;
  font-style: italic;
  margin-bottom: 0.15rem;
}

.ferryman-icon {
  margin-right: 0.25rem;
  font-style: normal;
  opacity: 0.95;
}

.ferryman-credit {
  font-size: 0.8rem;
  color: #c3b5e9;
  font-style: normal;
}

.intro {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #e2e4f0;
  line-height: 1.6;
}

.section-card {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(9, 11, 22, 0.95);
  border: 1px solid #2a3146;
}

.section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a0a6c0;
  margin-top: 0;
  margin-bottom: 0.15rem;
}

.section-body {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e2e4f0;
}

ul {
  margin: 0.2rem 0 0.45rem 1.1rem;
  padding: 0;
  font-size: 0.88rem;
}

.footer-note {
  margin-top: 0.7rem;
  font-size: 0.76rem;
  color: #727a96;
  font-style: italic;
}

@media (max-width: 720px) {
  .card {
    padding: 1.1rem 1.15rem 1rem;
  }
  h1 {
    font-size: 1.6rem;
  }
  .keywords {
    grid-template-columns: 1fr;
  }
  .hint {
    flex-basis: 100%;
    margin-left: 0;
  }
  .ferryman-block {
    flex-direction: row;
    align-items: flex-start;
  }
  .ferryman-portrait img {
    width: 68px;
    height: 68px;
  }
}

/* Updated dropdown styling */
.mode-select {
  padding: 0.6rem 2.5rem 0.6rem 1rem; /* Extra right padding fixes the chevron overlap */
  border-radius: 8px;
  background: rgba(15, 18, 32, 0.9);
  border: 1px solid #303853;
  color: #e2e4f0;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  appearance: none; /* Cleans up default browser styling */
  /* Re-add the custom chevron arrow so it looks consistent */
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23e2e4f0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem top 50%;
  background-size: 0.65rem auto;
}

.mode-select:hover {
  border-color: #e238a7;
}

.mode-select focus {
  border-color: #00f2ff; /* Cyan glow on focus */
}


/* --- SKULL SELECTOR STYLES --- */
.skull-row {
  display: flex;
  gap: 8px;
  background: rgba(15, 18, 32, 0.9);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #303853;
}

.skull-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3; /* Darker by default so the "lit" ones pop more */
  transition: all 0.2s ease;
  box-shadow: none !important;
  transform: none !important;
}

.skull-btn svg path {
  fill: #e2e4f0; /* Base color */
}

/* Hover State */
.skull-btn:hover {
  opacity: 0.8;
  transform: scale(1.1) !important;
}

/* Active (Lit Up) State */
.skull-btn.active {
  opacity: 1;
  filter: drop-shadow(0 0 5px #e238a7); /* Pink Glow */
}
.skull-btn.active svg path {
  fill: #e238a7;
}

/* --- THEME OVERRIDES --- */

/* Green Mode (Hive War) - Overrides the default Pink */
.skull-row.green-mode .skull-btn.active {
  filter: drop-shadow(0 0 5px #2bcf6a); /* Green Glow */
}

.skull-row.green-mode .skull-btn.active svg path {
  fill: #2bcf6a; /* Green Icon */
}