.title-bar {
  height: var(--title-bar-height);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(12px, 1.5vw, 16px);
  -webkit-app-region: drag;
  border-bottom: 1px solid var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.title-bar .title {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 8px);
  font-weight: 500;
  font-size: clamp(14px, 1vw, 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-controls {
  display: flex;
  -webkit-app-region: no-drag;
  margin-left: auto;
}

.window-controls button {
  width: clamp(32px, 4vw, 46px);
  height: var(--title-bar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text);
  opacity: 0.8;
  transition: all 0.2s;
  padding: 0;
}

.window-controls button svg {
  width: clamp(12px, 1.5vw, 16px);
  height: clamp(12px, 1.5vw, 16px);
}

.window-controls button:hover {
  opacity: 1;
  background: var(--bg-secondary);
}

.window-controls button#closeBtn:hover {
  background: var(--danger);
}

@media (max-width: 480px) {
  .title-bar .title {
    font-size: 14px;
  }
  
  .window-controls button {
    width: 32px;
  }
  
  .window-controls button svg {
    width: 12px;
    height: 12px;
  }
}