:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;

  background: #05070c;

  --eclipse-gold: #d6b66a;
  --eclipse-cyan: #6fe9ff;
  --eclipse-glass: rgba(14, 23, 38, 0.48);
}

* {
  box-sizing: border-box;
}

html,
body,
#eclipse-root {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(
      circle at 50% 20%,
      #132033,
      #05070c 65%
    );
}

button,
a {
  font: inherit;
}

.eclipse-shell {
  position: relative;
  isolation: isolate;
}

#eclipse-canvas {
  display: block;

  width: 100%;
  height: 100%;

  touch-action: none;
  outline: none;
}

.eclipse-overlay {
  position: absolute;
  z-index: 10;
  inset: 0;

  pointer-events: none;
}

.eclipse-ui-bar {
  position: absolute;
  top: 24px;
  left: 50%;

  display: flex;
  align-items: center;
  gap: 16px;

  padding: 10px 14px;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;

  background: rgba(4, 8, 14, 0.52);
  backdrop-filter: blur(18px);

  pointer-events: auto;

  transform: translateX(-50%);
}

.eclipse-brand {
  color: #ffffff;

  font-family: Cinzel, serif;
  font-size: 13px;
  letter-spacing: 0.22em;
}

.eclipse-status {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.eclipse-return {
  padding: 8px 12px;

  border: 1px solid rgba(214, 182, 106, 0.38);
  border-radius: 999px;

  color: #f2dfaa;
  background: rgba(214, 182, 106, 0.08);

  cursor: pointer;
}

.eclipse-return:hover,
.eclipse-return:focus-visible {
  background: rgba(214, 182, 106, 0.18);
  outline: none;
}

.eclipse-gateway-label {
  position: absolute;

  min-width: 150px;
  padding: 9px 12px;

  border: 1px solid rgba(111, 233, 255, 0.24);
  border-radius: 12px;

  color: #ffffff;
  background: rgba(6, 14, 24, 0.58);

  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;

  backdrop-filter: blur(12px);
  pointer-events: none;

  transform: translate(-50%, -50%);

  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.eclipse-transition {
  position: absolute;
  z-index: 50;
  inset: 0;

  display: flex;

  pointer-events: none;
}

.eclipse-door {
  width: 50%;
  height: 100%;

  background:
    linear-gradient(
      135deg,
      #f5f1e8,
      #b8aa8c
    );

  box-shadow:
    inset 0 0 80px rgba(90, 70, 35, 0.2);

  transform: translateX(0);

  transition:
    transform 1.1s cubic-bezier(0.77, 0, 0.18, 1);
}

.eclipse-door--left {
  transform-origin: left center;
}

.eclipse-door--right {
  transform-origin: right center;
}

.eclipse-transition[data-state="open"]
.eclipse-door--left {
  transform: translateX(-101%);
}

.eclipse-transition[data-state="open"]
.eclipse-door--right {
  transform: translateX(101%);
}

.eclipse-transition[data-state="closed"]
.eclipse-door {
  transform: translateX(0);
}

.eclipse-error {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  padding: 32px;

  color: #ffffff;
  background: #080b10;

  text-align: center;
  pointer-events: auto;
}

.eclipse-error code {
  color: var(--eclipse-cyan);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   ECLIPSE ENTRY DOORS
   ========================================================= */

.eclipse-transition-door {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50vw;

  z-index: 9999;

  pointer-events: none;

  transition:
    transform 1.35s
    cubic-bezier(
      0.76,
      0,
      0.24,
      1
    ),
    opacity 0.8s ease;
}

.eclipse-transition-door-left {
  left: 0;

  transform:
    translate3d(
      0,
      0,
      0
    );
}

.eclipse-transition-door-right {
  right: 0;

  transform:
    translate3d(
      0,
      0,
      0
    );
}

.eclipse-transition-open
.eclipse-transition-door-left {
  transform:
    translate3d(
      -105%,
      0,
      0
    );
}

.eclipse-transition-open
.eclipse-transition-door-right {
  transform:
    translate3d(
      105%,
      0,
      0
    );
}

.eclipse-transition-open
.eclipse-transition-door {
  opacity: 0;
  visibility: hidden;

  transition:
    transform 1.35s
    cubic-bezier(
      0.76,
      0,
      0.24,
      1
    ),
    opacity 0.45s ease 0.75s,
    visibility 0s linear 1.35s;
}

.eclipse-entry-overlay{
    position:fixed;
    inset:0;

    display:flex;
    align-items:center;
    justify-content:center;

    background:
        rgba(7,12,22,.55);

    backdrop-filter:blur(10px);

    z-index:50000;
}

.eclipse-entry-panel{

    text-align:center;

    padding:48px;

    border-radius:24px;

    background:
        rgba(18,24,40,.85);

    border:
        1px solid rgba(255,255,255,.08);

    color:white;
}

.eclipse-entry-icon{

    font-size:52px;

    margin-bottom:20px;
}

.eclipse-unlock-button{

    margin-top:28px;

    padding:16px 34px;

    border:none;

    border-radius:999px;

    font-size:17px;

    cursor:pointer;

    background:#2F7CF8;

    color:white;

    transition:.25s;
}

.eclipse-unlock-button:hover{

    transform:translateY(-2px);

    background:#4D92FF;
}

/* =========================================================
   ECLIPSE LOCKED ENTRY
   ========================================================= */

.eclipse-transition {
  position: fixed;
  inset: 0;

  z-index: 9000;

  pointer-events: none;
  overflow: hidden;
}

.eclipse-door {
  position: absolute;
  top: 0;
  bottom: 0;

  width: 50%;

  transition:
    transform 1.5s
      cubic-bezier(0.76, 0, 0.24, 1),
    opacity 0.65s ease 0.85s,
    visibility 0s linear 1.5s;

  will-change:
    transform,
    opacity;
}

.eclipse-door--left {
  left: 0;

  transform:
    translate3d(0, 0, 0);
}

.eclipse-door--right {
  right: 0;

  transform:
    translate3d(0, 0, 0);
}

/*
 * The body already receives this class:
 *
 * body.eclipse-transition-open
 */
body.eclipse-transition-open
.eclipse-door--left {
  transform:
    translate3d(-105%, 0, 0);
}

body.eclipse-transition-open
.eclipse-door--right {
  transform:
    translate3d(105%, 0, 0);
}

body.eclipse-transition-open
.eclipse-door {
  opacity: 0;
  visibility: hidden;
}

body.eclipse-transition-open
.eclipse-transition {
  visibility: hidden;
  pointer-events: none;
}

/* =========================================================
   ENTRY CONTROL
   ========================================================= */

.eclipse-entry-control {
  position: fixed;
  left: 50%;
  bottom: 9vh;

  z-index: 10000;

  transform:
    translateX(-50%);

  display: flex;
  justify-content: center;
  align-items: center;

  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0s linear 0.4s;
}

.eclipse-unlock-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-width: 210px;
  padding: 15px 28px;

  border:
    1px solid
    rgba(218, 186, 116, 0.55);

  border-radius: 999px;

  background:
    linear-gradient(
      135deg,
      rgba(27, 34, 49, 0.96),
      rgba(12, 17, 28, 0.96)
    );

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.38),
    inset 0 1px 0
      rgba(255, 255, 255, 0.08),
    0 0 24px
      rgba(201, 167, 94, 0.12);

  color: #f3ead5;

  font-family:
    "Cinzel",
    serif;

  font-size: 0.94rem;
  font-weight: 600;

  letter-spacing: 0.12em;
  text-transform: uppercase;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.eclipse-unlock-button:hover {
  transform:
    translateY(-2px);

  border-color:
    rgba(235, 207, 145, 0.9);

  box-shadow:
    0 22px 55px
      rgba(0, 0, 0, 0.44),
    0 0 34px
      rgba(219, 184, 108, 0.22);
}

.eclipse-unlock-button:focus-visible {
  outline:
    2px solid
    rgba(235, 207, 145, 0.95);

  outline-offset: 5px;
}

.eclipse-unlock-symbol {
  font-size: 1.25rem;
  line-height: 1;
}

body.eclipse-transition-open
.eclipse-entry-control {
  opacity: 0;
  visibility: hidden;

  transform:
    translateX(-50%)
    translateY(12px);

  pointer-events: none;
}
