.project-window {

  position: absolute;

  min-width: 420px;
  min-height: 260px;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  background:
    var(--panel);

  border:
    1px solid var(--border);

  backdrop-filter:
    blur(18px);

  box-shadow:
    0 24px 70px var(--shadow);

  transition:
    border var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);

}

.project-window.active-window {

  border-color:
    var(--border-strong);

  box-shadow:
    0 28px 90px rgba(0,0,0,0.62);

}

/* =========================
   WINDOW MARKER
========================= */

.window-marker {

  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 2px;

  opacity: 0.9;

}

/* =========================
   HEADER
========================= */

.window-header {

  height: 54px;

  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;

  padding: 0 14px;

  cursor: move;

  border-bottom:
    1px solid var(--border);

  background:
    rgba(255,255,255,0.015);

}

.project-title {

  width: 240px;

  min-width: 0;

  background: transparent;

  border: none;

  color:
    var(--text);

  font-size:
    13px;

  overflow: hidden;

  text-overflow: ellipsis;

}

.project-title::placeholder {

  color:
    var(--muted);

}

/* =========================
   CONTROLS
========================= */

.window-controls {

  display: flex;
  align-items: center;
  gap: 8px;

  flex-wrap: wrap;

}

.window-controls button {

  white-space: nowrap;

}

/* =========================
   FOOTER
========================= */

.window-footer {

  height: 34px;

  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 14px;

  border-top:
    1px solid var(--border);

  background:
    rgba(255,255,255,0.015);

  font-size:
    11px;

  color:
    var(--muted);

}

.window-stats {

  display: flex;
  align-items: center;
  gap: 14px;

}

/* =========================
   RESIZE HANDLE
========================= */

.resize-handle {

  position: absolute;

  right: 0;
  bottom: 0;

  width: 18px;
  height: 18px;

  cursor: nwse-resize;

  opacity: 0.18;

}

.resize-handle::before {

  content: "";

  position: absolute;

  right: 4px;
  bottom: 4px;

  width: 8px;
  height: 8px;

  border-right:
    1px solid rgba(255,255,255,0.5);

  border-bottom:
    1px solid rgba(255,255,255,0.5);

}

/* =========================
   WINDOW STATES
========================= */

.project-window.dragging {

  transition: none;

  transform:
    scale(1.01);

}

.project-window.resizing {

  transition: none;

}

/* =========================
   WINDOW GLOW
========================= */

.project-window.active-window .window-marker {

  box-shadow:
    0 0 12px rgba(255,255,255,0.22);

}

/* =========================
   SNAP GRID FEEL
========================= */

.project-window::after {

  content: "";

  position: absolute;

  inset: 0;

  pointer-events: none;

  border:
    1px solid transparent;

  transition:
    border var(--transition-fast);

}

.project-window.active-window::after {

  border:
    1px solid rgba(255,255,255,0.04);

}

/* =========================
   CLOSE BUTTON
========================= */

.closeBtn {

  min-width: 34px;

  padding:
    8px 10px;

}

/* =========================
   WINDOW ANIMATION
========================= */

.project-window {

  animation:
    windowAppear 0.18s ease;

}

@keyframes windowAppear {

  from {

    opacity: 0;

    transform:
      translateY(8px);

  }

  to {

    opacity: 1;

    transform:
      translateY(0);

  }

}