/* Easter egg styles: gameboy. Moved verbatim out of static/app.css (egg rebuild); linked right after app.css in index.html. */
/* Centered fixed overlay — no backdrop, click to dismiss */
.cgb-egg-wrap {
  position: fixed; inset: 0; z-index: 4500;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

.cgb-egg-wrap .cgb-gameboy { pointer-events: auto; cursor: pointer; }

.cgb-gameboy {
  position: relative; display: block;
  margin: 0;
  width: 422px; height: 697px;
  background: #eee;
  border-radius: 10px 10px 60px 10px;
  box-shadow: 5px 5px rgba(0,0,0,0.1);
  transform: scale(1.1); transform-origin: center center;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.45));
}

.cgb-gameboy:before {
  content: ""; position: absolute;
  width: 100%; height: 31px; border-bottom: 4px solid #e0e0e0;
}

.cgb-gameboy:after {
  content: ""; position: absolute; top: 0;
  width: 334px; height: 31px;
  border-left: 4px solid #e0e0e0; border-right: 4px solid #e0e0e0;
  margin-left: 40px; margin-right: 40px;
}

.cgb-gameboy .cgb-screen-cont {
  position: relative; top: 60px; left: 40px;
  width: 342px; height: 272px; margin-bottom: 58px;
  background-color: #777; border-radius: 13px 13px 50px 13px;
}

.cgb-gameboy .cgb-screen-cont .cgb-screen {
  position: relative; top: 30px;
  margin-left: auto; margin-right: auto;
  background: #bdae58; width: 225px; height: 205px;
  box-shadow: inset 3px 3px rgba(0,0,0,0.15);
}

.cgb-gameboy .cgb-screen-cont .cgb-screen .cgb-header {
  position: relative; top: -30px;
  width: 100%; height: 30px; padding-top: 10px;
  box-sizing: border-box; text-align: right;
  font-size: 10px; font-family: sans-serif; color: #b3b3b3;
}

.cgb-gameboy .cgb-screen-cont .cgb-screen .cgb-header:before {
  content: ""; position: absolute; left: -43px; top: 12px;
  width: 90px; height: 3px; background-color: #8b1d90;
  box-shadow: 0 6px 0 #283593;
}

.cgb-gameboy .cgb-screen-cont .cgb-screen .cgb-header:after {
  content: ""; position: absolute; right: -46px; top: 12px;
  width: 38px; height: 3px; background-color: #8b1d90;
  box-shadow: 0 6px 0 #283593;
}

/* Two-line "GORDIAN / BIOTECHNOLOGY" text — smaller font to fit 225px screen */
.cgb-gameboy .cgb-screen-cont .cgb-screen .cgb-animated-text {
  opacity: 0; display: block;
  position: relative; top: -26px; left: 0;
  width: 100%; text-align: center;
  color: #8a891f; font-size: 11px; line-height: 1.5;
  font-family: 'Pretendo'; z-index: 10;
}

.cgb-gameboy .cgb-screen-cont .cgb-screen .cgb-animated-text.cgb-end {
  opacity: 1; top: 50px;
  transition: top 1s linear;
}

.cgb-gameboy .cgb-screen-cont .cgb-power {
  content: ""; position: absolute;
  width: 10px; height: 10px; top: 100px; left: 20px;
  border-radius: 100%; background-color: #b98181;
  transition: background-color 300ms linear;
}

.cgb-gameboy .cgb-screen-cont .cgb-power:before {
  content: "BATTERY"; position: relative;
  top: 18px; left: -10px;
  font-size: 8px; font-family: sans-serif; color: #b3b3b3;
}

.cgb-gameboy .cgb-screen-cont .cgb-power.cgb-power-on {
  background-color: #f00; box-shadow: 0 0 3px 1px #ef5350;
}

.cgb-gameboy .cgb-controls-cont {
  display: block; position: relative; margin-top: 90px;
}

.cgb-gameboy .cgb-controls-cont .cgb-btn-direction {
  position: relative; margin-left: 40px; top: 60px;
}

.cgb-gameboy .cgb-controls-cont .cgb-btn-direction:before {
  content: ""; position: absolute; z-index: 1;
  top: 30px; left: 30px; width: 30px; height: 30px;
  background-color: #353535; border-radius: 100%;
}

.cgb-gameboy .cgb-controls-cont .cgb-btn-direction .cgb-vertical,
.cgb-gameboy .cgb-controls-cont .cgb-btn-direction .cgb-horizontal {
  position: absolute; left: 30px;
  width: 30px; height: 90px;
  background: #444; border-radius: 5px;
}

.cgb-gameboy .cgb-controls-cont .cgb-btn-direction .cgb-vertical:before,
.cgb-gameboy .cgb-controls-cont .cgb-btn-direction .cgb-horizontal:before {
  content: ""; position: relative; top: 99px; left: 8px;
  width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-top: 7px solid #dedede;
}

.cgb-gameboy .cgb-controls-cont .cgb-btn-direction .cgb-vertical:after,
.cgb-gameboy .cgb-controls-cont .cgb-btn-direction .cgb-horizontal:after {
  content: ""; position: relative; top: -27px; left: -5.6px;
  width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-bottom: 7px solid #dedede;
}

.cgb-gameboy .cgb-controls-cont .cgb-btn-direction .cgb-horizontal {
  transform: rotate(90deg);
}

.cgb-gameboy .cgb-controls-cont .cgb-btn-ab {
  position: absolute; top: 72px; left: 252px;
  width: 130px; height: 60px; background: #dfdfdf;
  border-radius: 30px; transform: rotate(-25deg);
}

.cgb-gameboy .cgb-controls-cont .cgb-btn-ab:after {
  content: ""; position: absolute;
  top: 8px; right: 9px;
  width: 44px; height: 44px;
  background: #a93671; box-shadow: 68px 0 #a93671;
  border-radius: 100%; transform: rotate(180deg);
}

.cgb-gameboy .cgb-controls-cont .cgb-btn-start-select {
  position: absolute; top: 205px; left: 140px;
  height: 12px; width: 60px;
  background: #999; border-radius: 10px;
  transform: rotate(-25deg);
  box-shadow: 57px 27px #999, 0 0 0 5px #dfdfdf, 57px 27px 0 5px #dfdfdf;
}

.cgb-gameboy .cgb-speakers {
  content: ""; position: relative;
  height: 70px; width: 8px; top: 260px; left: 300px;
  background: #ddd; border-radius: 4px;
  transform: rotate(-25deg);
  box-shadow: 20px 0 #ddd, 40px 0 #ddd, 60px 0 #ddd, 80px 0 #ddd, 100px 0 #ddd;
}

.cgb-phones {
  position: absolute; bottom: 4px; left: 50%;
  padding: 3px 5px; transform: translateX(-50%);
  color: #dadada; background-color: #e8e8e8;
  font-size: 8px; font-family: sans-serif;
  text-transform: uppercase; border-radius: 30px;
}

.cgb-phones:before {
  content: ""; position: absolute;
  width: 15px; height: 5px; bottom: -4px;
  background-color: #e8e8e8; left: 9px;
}

.cgb-phones:after {
  content: ""; position: absolute;
  width: 3px; height: 5px; bottom: -4px; left: 12px;
  background-color: #ddd; box-shadow: 5px 0 #ddd;
  border-radius: 4px 4px 0 0;
}

.cgb-on-off {
  position: absolute; top: 2px; left: 20%;
  padding: 3px 5px; transform: translateX(-50%);
  color: #dadada; background-color: #e8e8e8;
  font-size: 8px; font-family: sans-serif;
  text-transform: uppercase; border-radius: 30px;
}

.cgb-on-off:before {
  content: ""; position: absolute;
  width: 15px; height: 5px; top: -2px;
  background-color: #e8e8e8; left: 6px;
}

.cgb-on-off:after {
  content: ""; position: absolute;
  width: 3px; height: 5px; top: -2px; left: 9px;
  background-color: #ddd; box-shadow: 5px 0 #ddd;
  border-radius: 0 0 3px 3px;
}

@media (prefers-reduced-motion: reduce) {
  .cgb-egg-wrap { display: none; }
}
