
:root{
  --bg:#0b0d10;
  --panel:#0f1217;
  --muted:#7c8a99;
  --text:#e6ecf3;
  --accent:#4da3ff;
  --accent-2:#9b5cff;
  --radius:18px;
  --pad:18px;
}
*{box-sizing:border-box}
html,body{height:100%; margin:0; padding:0;}
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
  background:var(--bg);
  color:var(--text);
  overflow:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.container{
  width:100vw;
  height:100vh;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
  padding: 0;
  margin: 0;
}

.unity-shell{
  position:relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow:hidden;

  /* Start at full viewport size */
  width: 100vw;
  height: 100vh;
  flex: 1;

  /* Smooth size transitions when using the handle */
  transition: box-shadow .2s ease, border-color .2s ease;
}

.unity-shell:hover{
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}

#unity-canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  background:transparent;
}

/* Loader overlay */
.loader{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:var(--pad);
  background: radial-gradient(1200px 800px at 50% 50%, rgba(157, 115, 255, 0.08), rgba(77, 163, 255, 0.05), transparent 70%);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:600;
  color:var(--text);
  opacity:.9;
  user-select:none;
}
.brand .dot{
  width:10px;height:10px;border-radius:999px;background:linear-gradient(135deg,var(--accent),var(--accent-2));
  box-shadow:0 0 24px var(--accent);
}
.bar{
  width:min(80%, 520px);
  height:12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
}
.bar > .fill{
  width:0%;
  height:100%;
  background:linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin:left center;
  transition:width .18s ease;
}
.status{ font-size:14px; color:var(--muted); }

/* Custom resize handle (shows on hover) */
.resizer{
  position:absolute;
  right:8px;
  bottom:8px;
  width:22px; height:22px;
  border-radius:6px;
  background:rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:nwse-resize;
  opacity:0;
  transition:opacity .15s ease, background .2s ease;
  backdrop-filter: blur(6px);
  user-select:none;
}
.unity-shell:hover .resizer{ opacity:1; }
.resizer:hover{ background:rgba(255,255,255,0.12); }
.resizer:active{ transform: translateY(1px); }

.handle{
  width:12px;height:12px;
  border-right:2px solid rgba(255,255,255,0.7);
  border-bottom:2px solid rgba(255,255,255,0.7);
  transform: translateY(2px) translateX(2px) rotate(0deg);
}
