/* Universal Onion Original CSS */
body { overflow: hidden; }
.onion-original {
  position: relative;
  background: #1f2937;
  border-radius: 0;
  max-width: 770px;
  max-height: 770px;
  overflow: hidden;
}

.onion-base {
  width: 100%;
  height: 100%;
  position: relative;
}

.onion-base img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.onion-original:hover .onion-base img {
  opacity: 0.95;
}

.governance-trigger {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.05em;
  cursor: pointer;
  z-index: 40;
  transition: opacity 0.3s ease, text-shadow 0.3s ease;
}

.governance-trigger:hover {
  opacity: 0.8;
}

/* Modal overlay - hidden by default */
#governanceOverlay.governance-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
}

#governanceOverlay.governance-overlay.active {
  display: flex;
}

/* Modal content basics */
.governance-content {
  background: #ffffff;
  color: #000000;
  padding: 1rem;
  border-radius: 8px;
  margin: 0.5rem;
  max-width: 28rem;
  width: 100%;
}

.gov-header { display: flex; gap: 1rem; margin-bottom: 1rem; }
.gov-thumb {
  width: 6rem; height: 6rem; flex-shrink: 0; position: relative;
  border-radius: 4px; overflow: hidden; background: #ffffff;
}
.gov-actions { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.gov-primary { background: #2563eb; color: #fff; border: none; border-radius: 4px; padding: 0.5rem 0.75rem; cursor: pointer; }
.gov-secondary { background: #e5e7eb; color: #000; border: none; border-radius: 4px; padding: 0.25rem 0.75rem; cursor: pointer; }
.gov-close { background: #f3f4f6; color: #000; border: none; border-radius: 4px; padding: 0.25rem 0.75rem; cursor: pointer; }
.gov-body { border-top: 1px solid #e5e7eb; padding-top: 0.75rem; }

/* Rarity-based text styling */
.rarity-common .governance-trigger {
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 8px rgba(0,0,0,0.6);
}

.rarity-common:hover .governance-trigger {
  text-shadow: 2px 2px 6px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.7);
}

.rarity-rare .governance-trigger {
  color: #000000;
  text-shadow: 1px 1px 1px rgba(255,255,255,0.3);
}

.rarity-rare:hover .governance-trigger {
  text-shadow: 1px 1px 2px rgba(255,255,255,0.5), 0 0 4px rgba(255,255,255,0.3);
}

.rarity-legendary .governance-trigger {
  color: #1F2937;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8), 0 0 4px rgba(255,255,255,0.6);
}

.rarity-legendary:hover .governance-trigger {
  text-shadow: 1px 1px 3px rgba(255,255,255,0.9), 0 0 6px rgba(255,255,255,0.8);
}

/* Color overlays for Commons (00) - hash-based colors */
.rarity-common .color-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  mix-blend-mode: normal;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.rarity-common:hover .color-overlay {
  opacity: 0.9;
}

/* Color overlays for Rares (000) - psychedelic colors */
.rarity-rare .color-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.rarity-rare:hover .color-overlay {
  opacity: 0.95;
  transform: scale(1.005);
}

/* Legendaries (0000) - rainbow border effect */
.rarity-legendary {
  border-width: 6px;
  border-style: solid;
  transition: border-width 0.3s ease;
}

.rarity-legendary:hover {
  border-width: 8px;
}