/* Reset / Base */
body {
  margin: 0;
  padding: 0;
  font-family: "Georgia", serif;
  color: #e0e0e0;
  background: #000;
  overflow-x: hidden;
}

a {
  color: #ccc;
  text-decoration: none;
}
a:hover {
  color: #fff;
}

/* Background fade-in */
body::before {
  content: "";
  background: url('../images/background.png') center center no-repeat;
  background-size: contain;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  z-index: -1;
}
body.background-visible::before {
  opacity: 1;
}

/* Header and Navigation */
#mainHeader {
  display: flex;
  align-items: center;
  background: #1a001a;
  padding: 10px 20px;
  position: relative;
  z-index: 1000;
}

#hamburger {
  font-size: 28px;
  margin-right: 20px;
  cursor: pointer;
  color: #f4e1b1;
}

#navLinks ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

#navLinks li {
  position: relative;
}

#navLinks > ul > li > a {
  font-weight: bold;
  color: #f4e1b1;
  padding: 10px 15px;
  display: block;
}

#navLinks > ul > li:hover > a {
  background-color: #330033;
  border-radius: 4px;
}

/* Dropdown */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #1a001a;
  min-width: 150px;
  top: 100%;
  left: 0;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown:hover .dropdown-content {
  display: block;
  visibility: visible;
  opacity: 1;
}

.dropdown-content li a {
  display: block;
  padding: 10px 12px;
  color: #ddd;
  white-space: nowrap;
}
.dropdown-content li a:hover {
  background-color: #330033;
}

/* Center Box / Quote */
#centerBox {
  width: 600px;
  max-width: 90%;
  background: rgba(0, 0, 0, 0.7);
  padding: 40px;
  margin: 100px auto;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 25px rgba(255,255,255,0.1);
  transition: opacity 0.5s ease-in-out;
}

#rdmQuote {
  font-size: 1.5em;
  color: #f4e1b1;
}

/* Dialog Styling */
.ui-dialog {
  background-color: #1e1e1e;
  border: 1px solid #555;
  color: #ddd;
}
.ui-dialog .ui-dialog-titlebar {
  background: #330033;
  color: #f4e1b1;
  border: none;
}
.ui-dialog .ui-dialog-titlebar-close {
  background: transparent;
  border: none;
}
.ui-dialog-content {
  background-color: #1e1e1e;
  padding: 20px;
}

/* History Diagram Styling */
.history-box {
  width: 200px;
  padding: 10px 15px;
  margin: 10px;
  background-color: #220022;
  border: 1px solid #444;
  border-radius: 6px;
  text-align: center;
  display: inline-block;
  color: #f4e1b1;
  font-weight: bold;
  box-shadow: 0 0 5px #111;
  cursor: pointer;
}
.history-box:hover {
  background-color: #330033;
}

.history-container {
  text-align: center;
  margin-top: 30px;
}

.history-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

#connectorCanvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.history-lineage {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.history-row {
  display: flex;
  align-items: flex-start;
}

.history-origin {
  flex: 0 0 220px;
  font-weight: bold;
  color: #f4e1b1;
  padding: 10px;
  background: #1a001a;
  border: 1px solid #333;
  border-radius: 6px;
  margin-right: 20px;
}

.history-branches {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.branch-box {
  background: #220022;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 10px 15px;
  color: #f4e1b1;
  min-width: 150px;
  box-shadow: 0 0 5px #111;
}
.branch-box small {
  display: block;
  color: #bbb;
  margin-top: 5px;
}

.history-lineage {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 30px;
  font-family: Arial, sans-serif;
  color: #ddd;
}

.history-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.history-origin {
  min-width: 200px;
  font-weight: bold;
  font-size: 1.2em;
  color: #ffa500;
  padding-top: 8px;
}

.history-branches {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-start;
}

.branch-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #555;
  padding: 10px 14px;
  border-radius: 6px;
  min-width: 200px;
  max-width: 250px;
  font-size: 0.9em;
  box-shadow: 2px 2px 8px #222;
}

